summaryrefslogtreecommitdiff
path: root/gdk
diff options
context:
space:
mode:
authorIgnacio Casal Quinteiro <icq@gnome.org>2015-11-13 12:58:45 +0100
committerIgnacio Casal Quinteiro <icq@gnome.org>2015-11-13 12:58:45 +0100
commitd74a08b80f54e018bc3141849e3d0fbbf6f583b0 (patch)
tree347399c18d5038237706a7b8dcd241ca0c84651d /gdk
parent2ad243d43db6e72ed64e24af8d350c00ea630a51 (diff)
downloadgtk+-d74a08b80f54e018bc3141849e3d0fbbf6f583b0.tar.gz
win32: do not use g_clear_pointer also on the clipboard window
A follow up on the previous patch. We should use DestroyWindow directly since it has a different calling convention than the expected callback for g_clear_pointer
Diffstat (limited to 'gdk')
-rw-r--r--gdk/win32/gdkdisplay-win32.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gdk/win32/gdkdisplay-win32.c b/gdk/win32/gdkdisplay-win32.c
index 620dfe7747..b9897c0240 100644
--- a/gdk/win32/gdkdisplay-win32.c
+++ b/gdk/win32/gdkdisplay-win32.c
@@ -720,8 +720,12 @@ gdk_win32_display_dispose (GObject *object)
display_win32->hwnd = NULL;
}
- g_clear_pointer (&display_win32->clipboard_hwnd, (GDestroyNotify)DestroyWindow);
- _hwnd_next_viewer = NULL;
+ if (display_win32->clipboard_hwnd != NULL)
+ {
+ DestroyWindow (display_win32->clipboard_hwnd);
+ display_win32->clipboard_hwnd = NULL;
+ _hwnd_next_viewer = NULL;
+ }
G_OBJECT_CLASS (gdk_win32_display_parent_class)->dispose (object);
}