From 6a791c1f74c90c6d34e57edc32d026f3a4d244b8 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Tue, 5 Jan 2016 14:44:39 +0100 Subject: [PATCH] gegl-xml: Fix serialization of graph nodes that are not meta-ops https://bugzilla.gnome.org/show_bug.cgi?id=760161 --- gegl/gegl-xml.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gegl/gegl-xml.c b/gegl/gegl-xml.c index d93ea31a..ba037ae4 100644 --- a/gegl/gegl-xml.c +++ b/gegl/gegl-xml.c @@ -27,6 +27,7 @@ #include "gegl.h" #include "property-types/gegl-paramspecs.h" #include "gegl-instrument.h" +#include "gegl-node-private.h" #include "gegl-xml.h" #ifdef G_OS_WIN32 @@ -1148,6 +1149,7 @@ gchar * gegl_node_to_xml (GeglNode *gegl, const gchar *path_root) { + GeglOperation *operation; SerializeState ss; ss.buf = g_string_new (""); @@ -1156,8 +1158,9 @@ gegl_node_to_xml (GeglNode *gegl, ss.clones = g_hash_table_new (NULL, NULL); ss.terse = FALSE; + operation = gegl_node_get_gegl_operation (gegl); /* this case is probably only for empty graphs */ - if (!gegl_node_get_operation (gegl)) + if (gegl->is_graph && !operation) gegl = gegl_node_get_output_proxy (gegl, "output"); g_string_append (ss.buf, "\n");