Fixed crash when attempting to load an empty file.

Originally committed to SVN as r1773.
This commit is contained in:
Rodrigo Braz Monteiro 2008-01-19 01:59:50 +00:00
parent dca02bd76d
commit c9f31a2d83

View file

@ -260,7 +260,8 @@ wxString TextFileReader::ReadLineFromFile() {
}
#else
getline(file,buffer);
wxbuffer = wxString(buffer.c_str(),*conv);
wxbuffer.Clear();
if (buffer.length()) wxbuffer = wxString(buffer.c_str(),*conv);
#endif
}