X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c0f587c50021f6171df01682bd1059cf93866882..794bcc2dea743ac907b839f54e451847c9ea4b72:/src/common/textfile.cpp diff --git a/src/common/textfile.cpp b/src/common/textfile.cpp index 3ab5dc94c3..f10d5de576 100644 --- a/src/common/textfile.cpp +++ b/src/common/textfile.cpp @@ -80,6 +80,10 @@ wxString wxTextFile::Translate(const wxString& text, wxTextFileType type) if ( type == wxTextFileType_None ) return text; + // GRG: don't do anything either if it is empty + if ( text.IsEmpty() ) + return text; + wxString eol = GetEOL(type), result; // optimization: we know that the length of the new string will be about