]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/gtk/_gdi_wrap.cpp
Setup fix
[wxWidgets.git] / wxPython / src / gtk / _gdi_wrap.cpp
index 7f7413f60f6616c084addff9b964014a97f89d46..025d6c864d3a0b13e5ae31e72a73737bf98223b3 100644 (file)
@@ -1037,7 +1037,8 @@ SWIG_Python_TypeError(const char *type, PyObject *obj)
          PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received",
                       type, otype);
        }
-       Py_DECREF(str);
+       if (str)
+          Py_DECREF(str);
        return;
       }
     }