Skip to content

Commit

Permalink
Revert "Avoid a segfault when python code fails"
Browse files Browse the repository at this point in the history
This reverts commit a1e826e.
  • Loading branch information
nyalldawson committed May 23, 2016
1 parent 9b2be7a commit 68e5f5c
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/python/qgspythonutilsimpl.cpp
Expand Up @@ -300,10 +300,7 @@ bool QgsPythonUtilsImpl::runStringUnsafe( const QString& command, bool single )
// (non-unicode strings can be mangled)
PyObject* obj = PyRun_String( command.toUtf8().data(), single ? Py_single_input : Py_file_input, mMainDict, mMainDict );
bool res = nullptr == PyErr_Occurred();
if ( obj )
{
Py_DECREF( obj );
}
Py_DECREF( obj );

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

0 comments on commit 68e5f5c

Please sign in to comment.