summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/activeqt/control/qaxserverbase.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/activeqt/control/qaxserverbase.cpp b/src/activeqt/control/qaxserverbase.cpp
index 9b7fab8..f2d4262 100644
--- a/src/activeqt/control/qaxserverbase.cpp
+++ b/src/activeqt/control/qaxserverbase.cpp
@@ -906,7 +906,7 @@ HRESULT QClassFactory::CreateInstanceHelper(IUnknown *pUnkOuter, REFIID iid, voi
// Make sure a QApplication instance is present (inprocess case)
if (!qApp) {
qax_ownQApp = true;
- int argc = 0;
+ static int argc = 0; // static lifetime, since it's passed as reference to QApplication, which has a lifetime exceeding the stack frame
new QApplication(argc, 0);
}
QGuiApplication::setQuitOnLastWindowClosed(false);