Main: Use PyObject_IsTrue in combination with conditional ternary operator

This commit is contained in:
marioalexis
2022-05-17 10:55:41 -03:00
committed by Chris Hennes
parent 89803987a1
commit ccfa6cd9e5

View File

@@ -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;