Skip to content

Commit

Permalink
Work around QTBUG-119063
Browse files Browse the repository at this point in the history
  • Loading branch information
pcolby committed Nov 18, 2023
1 parent 26151e4 commit 986669c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/cli/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -336,8 +336,7 @@ int main(int argc, char *argv[])
for (const QString &error: cliErrors) {
showCliError(error);
}
if (!cliErrors.isEmpty()) {
return EXIT_FAILURE;
}
return (command->start()) ? QCoreApplication::exec() : EXIT_FAILURE;
const int result = ((cliErrors.isEmpty()) && (command->start())) ? QCoreApplication::exec() : EXIT_FAILURE;
delete command; // We don't strictly need to do this, but it does fix QTBUG-119063, and is probably good practice.
return result;
}

0 comments on commit 986669c

Please sign in to comment.