]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/_extras.py
remove static libraries and recreate them to avoid stale object files
[wxWidgets.git] / wxPython / src / _extras.py
index cc7b8ce623340f03fc75a88550e92e02ca57a587..0e8da6d20e07f1ba6358c4c538d2a7f6b80a253a 100644 (file)
@@ -637,7 +637,8 @@ def wxPyTypeCast(obj, typeStr):
     theClass = globals()[typeStr+"Ptr"]
     typeStr = __wxPyPtrTypeMap.get(typeStr, typeStr)
     if hasattr(obj, "this"):
-        if obj.__class__ is theClass:   # if already the right type then just return it
+        # if already the right type then just return it
+        if isinstance(obj, theClass) or obj.__class__ is theClass:
             return obj
         newPtr = ptrcast(obj.this, typeStr+"_p")
     else: