[gtk+/wip/gdk-gl] gdk/x11: Trap glXDestroyWindow()



commit 4d07a9ad3a3954a87db590d2a59b7d156d02d1cf
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Mon Aug 18 18:07:22 2014 +0100

    gdk/x11: Trap glXDestroyWindow()

 gdk/x11/gdkglcontext-x11.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/gdk/x11/gdkglcontext-x11.c b/gdk/x11/gdkglcontext-x11.c
index 676d661..cc9f4da 100644
--- a/gdk/x11/gdkglcontext-x11.c
+++ b/gdk/x11/gdkglcontext-x11.c
@@ -53,7 +53,12 @@ drawable_info_free (gpointer data_)
 {
   DrawableInfo *data = data_;
 
-  glXDestroyWindow (gdk_x11_display_get_xdisplay (data->display), data->drawable);
+  gdk_x11_display_error_trap_push (data->display);
+
+  if (data->drawable)
+    glXDestroyWindow (gdk_x11_display_get_xdisplay (data->display), data->drawable);
+
+  gdk_x11_display_error_trap_pop_ignored (data->display);
 
   g_slice_free (DrawableInfo, data);
 }


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