Fix scan coverity issues:
CID 184294: Uncaught exception CID 183597: Unchecked return value CID 175809: Dereference before null check CID 175810: Logically dead code CID 133000: Uninitialized scalar variable CID 133001: Uninitialized scalar variable CID 183591: Explicit null dereferenced
This commit is contained in:
@@ -610,9 +610,12 @@ PyObject* Application::sGetMainWindow(PyObject * /*self*/, PyObject *args)
|
||||
return NULL;
|
||||
|
||||
PythonWrapper wrap;
|
||||
wrap.loadCoreModule();
|
||||
wrap.loadGuiModule();
|
||||
wrap.loadWidgetsModule();
|
||||
if (!wrap.loadCoreModule() ||
|
||||
!wrap.loadGuiModule() ||
|
||||
!wrap.loadWidgetsModule()) {
|
||||
PyErr_SetString(PyExc_RuntimeError, "Failed to load Python wrapper for Qt");
|
||||
return 0;
|
||||
}
|
||||
try {
|
||||
return Py::new_reference_to(wrap.fromQWidget(Gui::getMainWindow(), "QMainWindow"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user