From ddafb8a3ab6370b3aab1c5c03e6a15357a91dc14 Mon Sep 17 00:00:00 2001 From: Mykola Grymalyuk Date: Tue, 21 Jun 2022 10:34:57 -0600 Subject: [PATCH] gui_main.py: Fix Menubar relaunch as root --- gui/gui_main.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/gui/gui_main.py b/gui/gui_main.py index 3e8fc2b62..9c5576d6d 100644 --- a/gui/gui_main.py +++ b/gui/gui_main.py @@ -231,10 +231,13 @@ class wx_python_gui: extension = "" if event: if event.GetEventObject() != wx.Menu: - if event.GetEventObject().GetLabel() == "Start Root Patching": - extension = " --gui_patch" - elif event.GetEventObject().GetLabel() == "Revert Root Patches": - extension = " --gui_unpatch" + try: + if event.GetEventObject().GetLabel() == "Start Root Patching": + extension = " --gui_patch" + elif event.GetEventObject().GetLabel() == "Revert Root Patches": + extension = " --gui_unpatch" + except TypeError: + pass if self.constants.launcher_script is None: args_string = f"'{self.constants.launcher_binary}'{extension}"