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:
@@ -1204,7 +1204,7 @@ void wxDC::DrawLabel(const wxString& text,
|
|||||||
wxString curLine;
|
wxString curLine;
|
||||||
for ( wxString::const_iterator pc = text.begin(); ; ++pc )
|
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
|
int xRealStart = x; // init it here to avoid compielr warnings
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user