Commit 106dc0ebd1c8db51170d02f75f812107aa7e7a58

Authored by Josh Klontz
1 parent 8eebfa09

don't delete application per coments, workaround for double deletion issue

Showing 1 changed file with 2 additions and 5 deletions
openbr/openbr_plugin.cpp
... ... @@ -1210,7 +1210,8 @@ bool br::Context::checkSDKPath(const QString &sdkPath)
1210 1210 return QFileInfo(sdkPath + "/share/openbr/openbr.bib").exists();
1211 1211 }
1212 1212  
1213   -// We create our own when the user hasn't
  1213 +// We create our own when the user hasn't.
  1214 +// Since we can't ensure that it gets deleted last, we never delete it.
1214 1215 static QCoreApplication *application = NULL;
1215 1216  
1216 1217 void br::Context::initialize(int &argc, char *argv[], QString sdkPath, bool useGui)
... ... @@ -1230,7 +1231,6 @@ void br::Context::initialize(int &argc, char *argv[], QString sdkPath, bool useG
1230 1231 // We take in argc as a reference due to:
1231 1232 // https://bugreports.qt-project.org/browse/QTBUG-5637
1232 1233 // QApplication should be initialized before anything else.
1233   - // Since we can't ensure that it gets deleted last, we never delete it.
1234 1234 if (QCoreApplication::instance() == NULL) {
1235 1235 #ifndef BR_EMBEDDED
1236 1236 if (useGui) application = new QApplication(argc, argv);
... ... @@ -1316,9 +1316,6 @@ void br::Context::finalize()
1316 1316  
1317 1317 delete Globals;
1318 1318 Globals = NULL;
1319   -
1320   - delete application;
1321   - application = NULL;
1322 1319 }
1323 1320  
1324 1321 QString br::Context::about()
... ...