[gtk+] win32: do not use g_clear_pointer to destroy the window
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] win32: do not use g_clear_pointer to destroy the window
- Date: Fri, 13 Nov 2015 11:58:16 +0000 (UTC)
commit 2ad243d43db6e72ed64e24af8d350c00ea630a51
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 | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/gdk/win32/gdkdisplay-win32.c b/gdk/win32/gdkdisplay-win32.c
index 7b1fbd8..620dfe7 100644
--- a/gdk/win32/gdkdisplay-win32.c
+++ b/gdk/win32/gdkdisplay-win32.c
@@ -714,7 +714,12 @@ 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_clear_pointer (&display_win32->clipboard_hwnd, (GDestroyNotify)DestroyWindow);
_hwnd_next_viewer = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]