]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/window.cpp
assert that GTKGetWindow() returns non-NULL GdkWindows
[wxWidgets.git] / src / gtk / window.cpp
index ce0eeaf86ab630e8fed5c89e885f6caa777f337d..6c9b7669f91626fbb27dcf6790b666e8950053ff 100644 (file)
@@ -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());
             }
         }
     }