Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Other check for null pointer before calling decref
- Loading branch information
Showing
with
6 additions
and
4 deletions.
-
+6
−4
src/python/qgspythonutilsimpl.cpp
|
@@ -580,11 +580,13 @@ bool QgsPythonUtilsImpl::evalString( const QString& command, QString& result ) |
|
|
bool success = nullptr != res; |
|
|
|
|
|
// TODO: error handling |
|
|
if ( res ) |
|
|
{ |
|
|
if ( success ) |
|
|
result = PyObjectToQString( res ); |
|
|
|
|
|
if ( success ) |
|
|
result = PyObjectToQString( res ); |
|
|
|
|
|
Py_XDECREF( res ); |
|
|
Py_XDECREF( res ); |
|
|
} |
|
|
|
|
|
// we are done calling python API, release global interpreter lock |
|
|
PyGILState_Release( gstate ); |
|
|