]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/contrib/ogl/mac/ogl_wrap.cpp
compilation fix for not MSW
[wxWidgets.git] / wxPython / contrib / ogl / mac / ogl_wrap.cpp
index 6d404c09cf9da491d77d58bf225ea56b05b0703d..a10a04ffd163e8f80c11ddedcd68fc2ec49d6e2b 100644 (file)
@@ -475,11 +475,12 @@ SWIG_Check_int(PyObject* obj)
     } else if (target == Py_None) {  
         Py_DECREF(Py_None);
         target = o;
-    } else {                         
-        o2 = target;
-        target = PyTuple_New(1);
-        PyTuple_SetItem(target, 0, o2);
-
+    } else {
+        if (!PyTuple_Check(target)) {
+            o2 = target;
+            target = PyTuple_New(1);
+            PyTuple_SetItem(target, 0, o2);
+        }            
         o3 = PyTuple_New(1);            
         PyTuple_SetItem(o3, 0, o);      
 
@@ -489,7 +490,7 @@ SWIG_Check_int(PyObject* obj)
         Py_DECREF(o3);
     }
     return target;
-}
+  }