]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/mac/_gdi_wrap.cpp
reSWIGged
[wxWidgets.git] / wxPython / src / mac / _gdi_wrap.cpp
index 9bd107d566bf00ca62c4eeb5ec72203e0cf77948..804b18cfbcd9225dd245d90432f76a3b44ae2459 100644 (file)
@@ -772,11 +772,17 @@ IMP_PYCALLBACK_BOOL_STRINGSTRING(wxPyFontEnumerator, wxFontEnumerator, OnFontEnc
 
 PyObject *wxPyFontEnumerator_GetEncodings(wxPyFontEnumerator *self){
             wxArrayString* arr = self->GetEncodings();
-            return wxArrayString2PyList_helper(*arr);
+            if (arr)
+                return wxArrayString2PyList_helper(*arr);
+            else
+                return PyList_New(0);
         }
 PyObject *wxPyFontEnumerator_GetFacenames(wxPyFontEnumerator *self){
             wxArrayString* arr = self->GetFacenames();
-            return wxArrayString2PyList_helper(*arr);
+            if (arr)
+                return wxArrayString2PyList_helper(*arr);
+            else
+                return PyList_New(0);
         }
 
 
@@ -1094,6 +1100,7 @@ static PyObject *_wrap_new_NamedColour(PyObject *self, PyObject *args, PyObject
         temp1 = True;
     }
     {
+        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (wxColour *)new wxColour((wxString const &)*arg1);
         
@@ -8615,7 +8622,7 @@ static PyObject *_wrap_Font_GetNoAntiAliasing(PyObject *self, PyObject *args, Py
     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
-        result = (bool)(arg1)->GetNoAntiAliasing();
+        result = (bool)((wxFont const *)arg1)->GetNoAntiAliasing();
         
         wxPyEndAllowThreads(__tstate);
         if (PyErr_Occurred()) SWIG_fail;