History

fix a couple shutdown crashes and a class of asan warning

Seth Alves committed 7 years ago

Commit 6589db61 parent 6cd57705 files · +39 −25Browse files

Showing the changes to interface/src/scripting/MenuScriptingInterface.cpp (1 of 5 files). Show all

Unified · Split

interface/src/scripting/MenuScriptingInterface.cpp+4−4
@@ -43,7 +43,7 @@ bool MenuScriptingInterface::menuExists(const QString& menu) { · 42 unmodified lines
4343 if (QThread::currentThread() == qApp->thread()) {
4444 return Menu::getInstance()->menuExists(menu);
4545 }
46− bool result;
46+ bool result { false };
4747 BLOCKING_INVOKE_METHOD(Menu::getInstance(), "menuExists",
4848 Q_RETURN_ARG(bool, result),
4949 Q_ARG(const QString&, menu));
@@ -86,7 +86,7 @@ bool MenuScriptingInterface::menuItemExists(const QString& menu, const QString& · 36 unmodified lines
8686 if (QThread::currentThread() == qApp->thread()) {
8787 return Menu::getInstance()->menuItemExists(menu, menuitem);
8888 }
89− bool result;
89+ bool result { false };
9090 BLOCKING_INVOKE_METHOD(Menu::getInstance(), "menuItemExists",
9191 Q_RETURN_ARG(bool, result),
9292 Q_ARG(const QString&, menu),
@@ -98,7 +98,7 @@ bool MenuScriptingInterface::isOptionChecked(const QString& menuOption) { · 5 unmodified lines
9898 if (QThread::currentThread() == qApp->thread()) {
9999 return Menu::getInstance()->isOptionChecked(menuOption);
100100 }
101− bool result;
101+ bool result { false };
102102 BLOCKING_INVOKE_METHOD(Menu::getInstance(), "isOptionChecked",
103103 Q_RETURN_ARG(bool, result),
104104 Q_ARG(const QString&, menuOption));
@@ -115,7 +115,7 @@ bool MenuScriptingInterface::isMenuEnabled(const QString& menuOption) { · 10 unmodified lines
115115 if (QThread::currentThread() == qApp->thread()) {
116116 return Menu::getInstance()->isOptionChecked(menuOption);
117117 }
118− bool result;
118+ bool result { false };
119119 BLOCKING_INVOKE_METHOD(Menu::getInstance(), "isMenuEnabled",
120120 Q_RETURN_ARG(bool, result),
121121 Q_ARG(const QString&, menuOption));