[gegl/soc-2011-warp] gegl-processor: add a g_return_if_fail to prevent a segfault if a sink operator has no input
- From: Michael Murà <mmure src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl/soc-2011-warp] gegl-processor: add a g_return_if_fail to prevent a segfault if a sink operator has no input
- Date: Tue, 16 Aug 2011 21:13:16 +0000 (UTC)
commit b1e4c6bd0b939a1f39baf2ebb4f7638d820f0df3
Author: Michael Murà <batolettre gmail com>
Date: Tue Aug 16 23:11:49 2011 +0200
gegl-processor: add a g_return_if_fail to prevent a segfault if a sink operator has no input
gegl/process/gegl-processor.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/gegl/process/gegl-processor.c b/gegl/process/gegl-processor.c
index 4bd9598..08c42a8 100644
--- a/gegl/process/gegl-processor.c
+++ b/gegl/process/gegl-processor.c
@@ -281,6 +281,8 @@ gegl_processor_set_node (GeglProcessor *processor,
processor->valid_region = NULL;
}
+ g_return_if_fail (processor->input);
+
g_object_ref (processor->input);
g_object_notify (G_OBJECT (processor), "node");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]