From ccfa6cd9e51016f351497aacb4d33506a432742e Mon Sep 17 00:00:00 2001 From: marioalexis Date: Tue, 17 May 2022 10:55:41 -0300 Subject: [PATCH] Main: Use PyObject_IsTrue in combination with conditional ternary operator --- src/Main/FreeCADGuiPy.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Main/FreeCADGuiPy.cpp b/src/Main/FreeCADGuiPy.cpp index 5694d4125b..34f37c779a 100644 --- a/src/Main/FreeCADGuiPy.cpp +++ b/src/Main/FreeCADGuiPy.cpp @@ -101,7 +101,7 @@ FreeCADGui_showMainWindow(PyObject * /*self*/, PyObject *args) static bool thr = false; if (!qApp) { - if (PyObject_IsTrue(inThread) && !thr) { + if ((PyObject_IsTrue(inThread) ? true : false) && !thr) { thr = true; std::thread t([]() { static int argc = 0;