snapshot: Ignore 0 sized clip nodes
authorTimm Bäder <mail@baedert.org>
Wed, 14 Mar 2018 09:51:55 +0000 (10:51 +0100)
committerTimm Bäder <mail@baedert.org>
Wed, 14 Mar 2018 16:28:41 +0000 (17:28 +0100)
This may happen due to the intersection before.

gtk/gtksnapshot.c

index a1e41652a6c545af05a839776919f683c5a7522b..1c0934612ad449cc0cd0764aec0865f67ce8fdc8 100644 (file)
@@ -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);