X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1cd86ff66828c91e4b3bc1296e1bcb67fae587c2..ad653fa23069c5d9378247084f03c9a718c3ad62:/src/gtk/textmeasure.cpp?ds=sidebyside diff --git a/src/gtk/textmeasure.cpp b/src/gtk/textmeasure.cpp index eafd06848d..87bc7c90d5 100644 --- a/src/gtk/textmeasure.cpp +++ b/src/gtk/textmeasure.cpp @@ -126,7 +126,7 @@ void wxTextMeasure::DoGetTextExtent(const wxString& string, // Set layout's text const wxCharBuffer dataUTF8 = wxGTK_CONV_FONT(string, GetFont()); - if ( !dataUTF8 ) + if ( !dataUTF8 && !string.empty() ) { // hardly ideal, but what else can we do if conversion failed? wxLogLastError(wxT("GetTextExtent"));