diff --git a/pcbnew/swig/pcbnew_footprint_wizards.cpp b/pcbnew/swig/pcbnew_footprint_wizards.cpp index 2d1e2c0ecb..12c214b0cb 100644 --- a/pcbnew/swig/pcbnew_footprint_wizards.cpp +++ b/pcbnew/swig/pcbnew_footprint_wizards.cpp @@ -99,6 +99,11 @@ wxString PYTHON_FOOTPRINT_WIZARD::CallRetStrMethod( const char* aMethod, PyObjec PyObject* result = CallMethod( aMethod, aArglist ); + if ( result == Py_None ) { + Py_DECREF( result ); + return ret; + } + if( result ) { #if PY_MAJOR_VERSION >= 3 @@ -214,6 +219,11 @@ wxString PYTHON_FOOTPRINT_WIZARD::GetParameterPageName( int aPage ) Py_DECREF( arglist ); + if ( result == Py_None ) { + Py_DECREF( result ); + return ret; + } + if( result ) { #if PY_MAJOR_VERSION >= 3