]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/my_typemaps.i
Can wxMemoryDC derive from wxWindowDC on all platforms?
[wxWidgets.git] / wxPython / src / my_typemaps.i
index ea5588022d22c6061226268f8cde2bae1cbe16fa..331ccc07eb32305a60faf8bdf883a1bac2e8dbbb 100644 (file)
@@ -125,7 +125,10 @@ MAKE_INT_ARRAY_TYPEMAPS(styles, styles_field)
 
 
 %typemap(out) wxCharBuffer {
-    $result = PyString_FromString((char*)$1.data());
+    if ($1.data())
+        $result = PyString_FromString((char*)$1.data());
+    else
+        $result = PyString_FromString("");
 }