[gtk] snapshot: Ignore 0 sized clip nodes



commit 5f2283c0abf7cdd69aaa19a9199d1673965454cf
Author: Timm Bäder <mail baedert org>
Date:   Wed Mar 14 10:51:55 2018 +0100

    snapshot: Ignore 0 sized clip nodes
    
    This may happen due to the intersection before.

 gtk/gtksnapshot.c | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/gtk/gtksnapshot.c b/gtk/gtksnapshot.c
index a1e41652a6..1c0934612a 100644
--- a/gtk/gtksnapshot.c
+++ b/gtk/gtksnapshot.c
@@ -762,6 +762,10 @@ gtk_snapshot_collect_rounded_clip (GtkSnapshot      *snapshot,
       clip_node = gsk_rounded_clip_node_new (node, &state->data.rounded_clip.bounds);
     }
 
+  if (clip_node->bounds.size.width == 0 ||
+      clip_node->bounds.size.height == 0)
+    return NULL;
+
   if (name)
     gsk_render_node_set_name (clip_node, name);
 


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