]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/mac/_controls_wrap.cpp
fix for future bakefile versions
[wxWidgets.git] / wxPython / src / mac / _controls_wrap.cpp
index 551f5a382820ea66a6c39a8071e0e30122369c03..d5959d4d2d73e7cad4e597ac53293b70a9b81950 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;
       }
     }