From 967a322fe965bd511d0d45cec336047c36ea39b9 Mon Sep 17 00:00:00 2001 From: Guillermo Rodriguez Garcia Date: Sun, 20 Feb 2000 01:08:40 +0000 Subject: [PATCH] Don't try to translate empty strings (just a cosmetical issue - it should not fail anyway, but it is cleaner this way) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6154 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/textfile.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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