From 77ae969e519a6105c8467dbd4333f918dd55668f Mon Sep 17 00:00:00 2001 From: Peter Anthony Harvey Date: Mon, 16 Jan 2006 22:24:00 +0000 Subject: Do not try to store a string parameter if it is null (avoids segfault). --- lib/ephy-node.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/ephy-node.c') diff --git a/lib/ephy-node.c b/lib/ephy-node.c index 67889893b..36bc2d22c 100644 --- a/lib/ephy-node.c +++ b/lib/ephy-node.c @@ -724,6 +724,8 @@ ephy_node_write_to_xml(EphyNode *node, value = g_ptr_array_index (node->properties, i); if (value == NULL) continue; + if (G_VALUE_TYPE (value) == G_TYPE_STRING && + g_value_get_string (value) == NULL) continue; ret = xmlTextWriterStartElement (writer, (const xmlChar *)"property"); if (ret < 0) break; -- cgit v1.2.3