X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f69e200970580080565c8aadc10893c29e46abeb..8ae4f08661d7b324d5cd7aa16ab1a7b2810d94f2:/src/gtk/dcclient.cpp?ds=sidebyside diff --git a/src/gtk/dcclient.cpp b/src/gtk/dcclient.cpp index 707f88fbc5..9372246ca3 100644 --- a/src/gtk/dcclient.cpp +++ b/src/gtk/dcclient.cpp @@ -1473,6 +1473,8 @@ void wxWindowDC::DoDrawText( const wxString &text, wxCoord x, wxCoord y ) const wxCharBuffer data = wxConvUTF8.cWC2MB( text ); #else const wxWCharBuffer wdata = wxConvLocal.cMB2WC( text ); + if ( !wdata ) + return; const wxCharBuffer data = wxConvUTF8.cWC2MB( wdata ); #endif size_t datalen = strlen((const char*)data); @@ -1714,7 +1716,11 @@ void wxWindowDC::DoGetTextExtent(const wxString &string, #else const wxWCharBuffer wdata = wxConvLocal.cMB2WC( string ); if ( !wdata ) + { + if (width) (*width) = 0; + if (height) (*height) = 0; return; + } const wxCharBuffer data = wxConvUTF8.cWC2MB( wdata ); const char *dataUTF8 = (const char *)data; #endif