[gtk-wayland v2 PATCH 3/3] ignore the windows updates with wrong width and height



From: Juan Zhao <juan j zhao intel com>

When running applications over wayland, like testcombo.
We meet segment fault according to the wrong width and height. Ignore these window's updates.
https://bugzilla.gnome.org/show_bug.cgi?id=663550
---
 gdk/gdkwindow.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index e2966e2..6d7efb3 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -3892,6 +3892,9 @@ gdk_window_process_updates_internal (GdkWindow *window)
   gboolean save_region = FALSE;
   GdkRectangle clip_box;
 
+  if( window->width < 0 || window->height < 0 )
+       return;
+
   /* Ensure the window lives while updating it */
   g_object_ref (window);
 
-- 
1.7.1



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