Skip to content

Commit e008194

Browse files
authored
Merge pull request #80 from chennes/guiUpTestFix
Correct GuiUp check when outside FreeCAD
2 parents 7ff7bb2 + 311d5ae commit e008194

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

addonmanager_freecad_interface.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,11 @@ def get_python_exe():
107107
try:
108108
from PySide6 import QtCore, QtWidgets
109109

110-
GuiUp = True if QtWidgets.QApplication.instance() else False
110+
GuiUp = (
111+
True
112+
if hasattr(QtWidgets, "QApplication") and QtWidgets.QApplication.instance()
113+
else False
114+
)
111115
from PySide6.QtUiTools import QUiLoader
112116
except ImportError:
113117
try:

0 commit comments

Comments
 (0)