[gtk+/wip/otte/rendernode: 88/110] snapshot: Handle NULL returns in pop_and_append()
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/otte/rendernode: 88/110] snapshot: Handle NULL returns in pop_and_append()
- Date: Mon, 19 Dec 2016 04:51:37 +0000 (UTC)
commit 373d55e87f6da531e60ba1ecd86dfbbec8e7e22a
Author: Benjamin Otte <otte redhat com>
Date: Sat Dec 17 08:03:43 2016 +0100
snapshot: Handle NULL returns in pop_and_append()
gtk/gtksnapshot.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtksnapshot.c b/gtk/gtksnapshot.c
index 4f05586..dfcd3f3 100644
--- a/gtk/gtksnapshot.c
+++ b/gtk/gtksnapshot.c
@@ -473,8 +473,11 @@ gtk_snapshot_pop_and_append (GtkSnapshot *snapshot)
GskRenderNode *node;
node = gtk_snapshot_pop (snapshot);
- gtk_snapshot_append_node (snapshot, node);
- gsk_render_node_unref (node);
+ if (node)
+ {
+ gtk_snapshot_append_node (snapshot, node);
+ gsk_render_node_unref (node);
+ }
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]