X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1cd86ff66828c91e4b3bc1296e1bcb67fae587c2..da6f998486f1070e205f2e0a54f22a1b67cb32a4:/src/gtk/textmeasure.cpp diff --git a/src/gtk/textmeasure.cpp b/src/gtk/textmeasure.cpp index eafd06848d..407a62f36b 100644 --- a/src/gtk/textmeasure.cpp +++ b/src/gtk/textmeasure.cpp @@ -3,7 +3,6 @@ // Purpose: wxTextMeasure implementation for wxGTK // Author: Manuel Martin // Created: 2012-10-05 -// RCS-ID: $Id: // Copyright: (c) 1997-2012 wxWidgets team // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -126,7 +125,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"));