Skip to content

Commit

Permalink
Delete command before app destruction (QTBUG-119063)
Browse files Browse the repository at this point in the history
  • Loading branch information
pcolby committed Nov 17, 2023
1 parent 28073c1 commit f9f233c
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;
return result;
}

0 comments on commit f9f233c

Please sign in to comment.