[gtk+/gtk-3-18] win32: do not use g_clear_pointer to destroy the window



commit 7be06688ffc1a47387e4be8c792a684652e69182
Author: Ignacio Casal Quinteiro <icq gnome org>
Date:   Fri Nov 13 12:54:54 2015 +0100

    win32: do not use g_clear_pointer to destroy the window
    
    DestroyWindow expects a different calling convenction so
    we endup getting an error at runtime

 gdk/win32/gdkdisplay-win32.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/gdk/win32/gdkdisplay-win32.c b/gdk/win32/gdkdisplay-win32.c
index f61624b..27c77fa 100644
--- a/gdk/win32/gdkdisplay-win32.c
+++ b/gdk/win32/gdkdisplay-win32.c
@@ -710,7 +710,11 @@ gdk_win32_display_dispose (GObject *object)
 {
   GdkWin32Display *display_win32 = GDK_WIN32_DISPLAY (object);
 
-  g_clear_pointer (&display_win32->hwnd, (GDestroyNotify)DestroyWindow);
+  if (display_win32->hwnd != NULL)
+    {
+      DestroyWindow (display_win32->hwnd);
+      display_win32->hwnd = NULL;
+    }
 
   G_OBJECT_CLASS (gdk_win32_display_parent_class)->dispose (object);
 }


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