coverity#440338 Dereference null return value
Change-Id: I5da7c1d8fe7f4632b386a02dd54f4b203a00fc25
This commit is contained in:
@@ -135,7 +135,14 @@ static void getRuntimeImpl( PyRef & globalDict, PyRef &runtimeImpl )
|
|||||||
Reference< XInterface > () );
|
Reference< XInterface > () );
|
||||||
}
|
}
|
||||||
|
|
||||||
globalDict = PyRef( PyModule_GetDict(PyImport_AddModule("__main__")));
|
PyObject* pModule = PyImport_AddModule("__main__");
|
||||||
|
|
||||||
|
if (!pModule)
|
||||||
|
{
|
||||||
|
throw RuntimeException("can't import __main__ module", Reference< XInterface > ());
|
||||||
|
}
|
||||||
|
|
||||||
|
globalDict = PyRef( PyModule_GetDict(pModule));
|
||||||
|
|
||||||
if( ! globalDict.is() ) // FATAL !
|
if( ! globalDict.is() ) // FATAL !
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user