]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/msw/_controls_wrap.cpp
Fix shift and other keys with wxGetKeyState on mac
[wxWidgets.git] / wxPython / src / msw / _controls_wrap.cpp
index 5c803a74ae084c294f16372d6289db46f558a5b9..479d15b971ece7219587ec7b1c7c56b5fc0e40fe 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;
       }
     }