]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/window.cpp
wxListCtrl::InsertItem() returned wrong index.
[wxWidgets.git] / src / gtk1 / window.cpp
index d56ab1057d279252182c0f2419ffde5a63b2560c..9d8bd481a93b121b426372d742d8677198acf288 100644 (file)
@@ -3777,6 +3777,8 @@ wxPoint wxGetMousePosition()
 
     int x, y;
     GdkWindow* windowAtPtr = gdk_window_at_pointer(& x, & y);
+    if (!windowAtPtr)
+      return wxPoint(-999, -999);
 
     Display *display = GDK_WINDOW_XDISPLAY(windowAtPtr);
     Window rootWindow = RootWindowOfScreen (DefaultScreenOfDisplay(display));