Avoid assert dialog in ClientToScreen()/ScreenToClient(), it's just too annoying

This commit is contained in:
Paul Cornett
2016-11-03 09:38:39 -07:00
parent ebfa5a4128
commit e3f117c4f3

View File

@@ -3305,7 +3305,11 @@ void wxWindowGTK::DoClientToScreen( int *x, int *y ) const
return;
}
wxCHECK_RET(source, "ClientToScreen failed on unrealized window");
if (source == NULL)
{
wxLogDebug("ClientToScreen cannot work when toplevel window is not shown");
return;
}
int org_x = 0;
int org_y = 0;
@@ -3375,7 +3379,11 @@ void wxWindowGTK::DoScreenToClient( int *x, int *y ) const
return;
}
wxCHECK_RET(source, "ScreenToClient failed on unrealized window");
if (source == NULL)
{
wxLogDebug("ScreenToClient cannot work when toplevel window is not shown");
return;
}
int org_x = 0;
int org_y = 0;