Skip to content
Permalink
Browse files

Other check for null pointer before calling decref

  • Loading branch information
elpaso committed May 23, 2016
1 parent a1e826e commit 9b2be7a2e16757620c08e93bc2ac2ccc54289de0
Showing with 6 additions and 4 deletions.
  1. +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 );

0 comments on commit 9b2be7a

Please sign in to comment.
You can’t perform that action at this time.