[gtk/wip/matthiasc/popup5: 131/152] GDK W32: be able to handle NULL cursor



commit 3faa9b3090fb2582461722c566f64042ac3258db
Author: Руслан Ижбулатов <lrn1986 gmail com>
Date:   Tue May 21 21:17:54 2019 +0000

    GDK W32: be able to handle NULL cursor

 gdk/win32/gdkdevice-virtual.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/gdk/win32/gdkdevice-virtual.c b/gdk/win32/gdkdevice-virtual.c
index 3910f0bd39..d15a4bc477 100644
--- a/gdk/win32/gdkdevice-virtual.c
+++ b/gdk/win32/gdkdevice-virtual.c
@@ -144,7 +144,11 @@ gdk_device_virtual_grab (GdkDevice    *device,
     {
       GdkWin32HCursor *win32_hcursor;
       GdkWin32Display *display = GDK_WIN32_DISPLAY (gdk_device_get_display (device));
-      win32_hcursor = gdk_win32_display_get_win32hcursor (display, cursor);
+      win32_hcursor = NULL;
+
+      if (cursor != NULL)
+        win32_hcursor = gdk_win32_display_get_win32hcursor (display, cursor);
+
       g_set_object (&display->grab_cursor, win32_hcursor);
 
       if (display->grab_cursor != NULL)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]