Skip to content

Commit 311d5ae

Browse files
committed
Correct GuiUp check when outside FreeCAD
1 parent a4d2112 commit 311d5ae

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)