X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7da662ce7ccf92964feef2a31a054b9b6c4acb70..30e24d9dd5a5abf1c9a375ea259eb239b122b7f7:/wxPython/src/my_typemaps.i diff --git a/wxPython/src/my_typemaps.i b/wxPython/src/my_typemaps.i index ea5588022d..958ac1eac5 100644 --- a/wxPython/src/my_typemaps.i +++ b/wxPython/src/my_typemaps.i @@ -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(""); } @@ -239,6 +242,10 @@ MAKE_INT_ARRAY_TYPEMAPS(styles, styles_field) for (i=0; iAdd(PyInt_AS_LONG(number)); Py_DECREF(item); Py_DECREF(number);