From 106dc0ebd1c8db51170d02f75f812107aa7e7a58 Mon Sep 17 00:00:00 2001 From: Josh Klontz Date: Tue, 26 Jan 2016 14:08:29 -0500 Subject: [PATCH] don't delete application per coments, workaround for double deletion issue --- openbr/openbr_plugin.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/openbr/openbr_plugin.cpp b/openbr/openbr_plugin.cpp index 8ebe139..a95dc4f 100644 --- a/openbr/openbr_plugin.cpp +++ b/openbr/openbr_plugin.cpp @@ -1210,7 +1210,8 @@ bool br::Context::checkSDKPath(const QString &sdkPath) return QFileInfo(sdkPath + "/share/openbr/openbr.bib").exists(); } -// We create our own when the user hasn't +// We create our own when the user hasn't. +// Since we can't ensure that it gets deleted last, we never delete it. static QCoreApplication *application = NULL; 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 // We take in argc as a reference due to: // https://bugreports.qt-project.org/browse/QTBUG-5637 // QApplication should be initialized before anything else. - // Since we can't ensure that it gets deleted last, we never delete it. if (QCoreApplication::instance() == NULL) { #ifndef BR_EMBEDDED if (useGui) application = new QApplication(argc, argv); @@ -1316,9 +1316,6 @@ void br::Context::finalize() delete Globals; Globals = NULL; - - delete application; - application = NULL; } QString br::Context::about() -- libgit2 0.21.4