From 696e38e2e4aefa612a4b281a002ad0088bc258fa Mon Sep 17 00:00:00 2001 From: Wei-Cheng Pan Date: Tue, 8 Oct 2013 18:50:08 +0800 Subject: [PATCH] fix crash problem in QCoreApplication::arguments The constructor of QApplication takes a reference to int, so argc must not be a local variable. Fixes #28. --- src/top.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/top.cc b/src/top.cc index 2a64fa03..f2a0df6b 100644 --- a/src/top.cc +++ b/src/top.cc @@ -17,7 +17,7 @@ Handle ProcessEvents(const Arguments& args) { void Initialize(Handle target) { Browser::Initialize(target); - int argc = 0; + static int argc = 0; char** argv = NULL; app = new QApplication(argc, argv);