[gtk+] Avoid criticals in gtk_image_get_render_node
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Avoid criticals in gtk_image_get_render_node
- Date: Thu, 10 Nov 2016 13:27:04 +0000 (UTC)
commit 7b2313a6df3bc8c9b3c25dbea319051b3d9cd789
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Nov 10 08:26:37 2016 -0500
Avoid criticals in gtk_image_get_render_node
These nodes can be NULL, we need to handle that.
gtk/gtkimage.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkimage.c b/gtk/gtkimage.c
index 7d5e99f..612b337 100644
--- a/gtk/gtkimage.c
+++ b/gtk/gtkimage.c
@@ -1458,8 +1458,11 @@ gtk_image_get_render_node (GtkWidget *widget,
node = gtk_icon_helper_get_render_node (priv->icon_helper, renderer);
}
- gsk_render_node_append_child (res, node);
- gsk_render_node_unref (node);
+ if (node != NULL)
+ {
+ gsk_render_node_append_child (res, node);
+ gsk_render_node_unref (node);
+ }
return res;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]