Skip to content

Commit

Permalink
Revert "Other check for null pointer before calling decref"
Browse files Browse the repository at this point in the history
This reverts commit 9b2be7a.
  • Loading branch information
nyalldawson committed May 23, 2016
1 parent 68e5f5c commit 707ff90
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/python/qgspythonutilsimpl.cpp
Expand Up @@ -577,13 +577,11 @@ bool QgsPythonUtilsImpl::evalString( const QString& command, QString& result )
bool success = nullptr != res;

// TODO: error handling
if ( res )
{
if ( success )
result = PyObjectToQString( res );

Py_XDECREF( res );
}
if ( success )
result = PyObjectToQString( res );

Py_XDECREF( res );

// we are done calling python API, release global interpreter lock
PyGILState_Release( gstate );
Expand Down

0 comments on commit 707ff90

Please sign in to comment.