Skip to content

Commit

Permalink
Allocate on stack
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Apr 15, 2020
1 parent 1140a08 commit f11deee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/process/main.cpp
Expand Up @@ -86,7 +86,7 @@ int main( int argc, char *argv[] )
#endif // _MSC_VER
#endif // Q_OS_WIN

QgsApplication *app = new QgsApplication( argc, argv, false );
QgsApplication app( argc, argv, false );
QString myPrefixPath;
if ( myPrefixPath.isEmpty() )
{
Expand Down Expand Up @@ -114,10 +114,10 @@ int main( int argc, char *argv[] )

QgsProcessingExec exec;
int res = 0;
QTimer::singleShot( 0, app, [&exec, args, &res]
QTimer::singleShot( 0, &app, [&exec, args, &res]
{
res = exec.run( args );
QCoreApplication::exit( res );
} );
return app->exec();
return app.exec();
}

0 comments on commit f11deee

Please sign in to comment.