Skip to content
Permalink
Browse files

Revert "Avoid a segfault when python code fails"

This reverts commit a1e826e.
  • Loading branch information
nyalldawson committed May 23, 2016
1 parent 9b2be7a commit 68e5f5cdca28b52dfe5b3cf7d81a0bdc61dd18f0
Showing with 1 addition and 4 deletions.
  1. +1 −4 src/python/qgspythonutilsimpl.cpp
@@ -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 );

0 comments on commit 68e5f5c

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