[gegl] Don't try to read props of NULL node->operation
- From: Daniel Sabo <daniels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] Don't try to read props of NULL node->operation
- Date: Fri, 7 Jun 2013 05:51:32 +0000 (UTC)
commit e6cc10d11af4c87fd4e27099fcbb06a41065612c
Author: Daniel Sabo <DanielSabo gmail com>
Date: Thu Jun 6 22:27:53 2013 -0700
Don't try to read props of NULL node->operation
gegl/graph/gegl-node.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/gegl/graph/gegl-node.c b/gegl/graph/gegl-node.c
index 068c0ec..fba9b2a 100644
--- a/gegl/graph/gegl-node.c
+++ b/gegl/graph/gegl-node.c
@@ -1273,7 +1273,7 @@ gegl_node_set_valist (GeglNode *self,
{
object = G_OBJECT (self);
}
- else
+ else if (self->operation)
{
pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (self->operation),
property_name);
@@ -1362,7 +1362,8 @@ gegl_node_set_property (GeglNode *self,
return;
}
- pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (self->operation), property_name);
+ if (self->operation)
+ pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (self->operation), property_name);
if (pspec)
{
if (G_IS_PARAM_SPEC_ENUM (pspec) && G_VALUE_HOLDS (value, G_TYPE_STRING))
@@ -1423,7 +1424,8 @@ gegl_node_get_property (GeglNode *self,
return;
}
- pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (self->operation), property_name);
+ if (self->operation)
+ pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (self->operation), property_name);
if (pspec)
{
if (!G_IS_VALUE (value))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]