From 5dd7eef7de330f764427db28c841408383f0366c Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 27 Aug 2006 10:04:28 +0000 Subject: [PATCH] assert that GTKGetWindow() returns non-NULL GdkWindows git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40866 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/window.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index ce0eeaf86a..6c9b7669f9 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -3562,7 +3562,14 @@ void wxWindowGTK::GTKUpdateCursor() const size_t count = windowsThis.size(); for ( size_t n = 0; n < count; n++ ) { - gdk_window_set_cursor(windowsThis[n], cursor.GetCursor()); + GdkWindow *win = windowsThis[n]; + if ( !win ) + { + wxFAIL_MSG(_T("NULL window returned by GTKGetWindow()?")); + continue; + } + + gdk_window_set_cursor(win, cursor.GetCursor()); } } } -- 2.45.2