]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/msw/streams.cpp
wxFileSelector should have file name only, not path, passed to 3rd arg
[wxWidgets.git] / wxPython / src / msw / streams.cpp
index c391ffde0fb5d0a152805000d76102791483e434..cc97a57d90622d15ce1360f1faf780f0e8e7e957 100644 (file)
@@ -400,8 +400,10 @@ public:
         if (!PyObject_HasAttrString(py, name))
             return NULL;
         PyObject* o = PyObject_GetAttrString(py, name);
-        if (!PyMethod_Check(o) && !PyCFunction_Check(o))
+        if (!PyMethod_Check(o) && !PyCFunction_Check(o)) {
+            Py_DECREF(o);
             return NULL;
+        }
         return o;
     }