test that iterator is valid before comparing with it (another bug introduced when replacing indices with iterators)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53143 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
5769cf0f89
commit
e447be5514
@ -1204,7 +1204,7 @@ void wxDC::DrawLabel(const wxString& text,
|
||||
wxString curLine;
|
||||
for ( wxString::const_iterator pc = text.begin(); ; ++pc )
|
||||
{
|
||||
if ( *pc == _T('\n') || pc == text.end() )
|
||||
if ( pc == text.end() || *pc == '\n' )
|
||||
{
|
||||
int xRealStart = x; // init it here to avoid compielr warnings
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user