diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index 96789defe2..1d3c55f1f9 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -3201,7 +3201,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; @@ -3271,7 +3275,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;