]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/msw/xrc_wrap.cpp
'[1219035] cleanup: miscellaneous' and minor source cleaning.
[wxWidgets.git] / wxPython / src / msw / xrc_wrap.cpp
index c0159f9434b4e141fbc13166ff72a3743d85f797..de198811ab77c7a3d2a16419b7cdb8fa5c4c2953 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);
        }
          PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received",
                       type, otype);
        }
-       Py_DECREF(str);
+       if (str)
+          Py_DECREF(str);
        return;
       }
     }   
        return;
       }
     }