Commit 015a2ca2 authored by Mike Blumenkrantz's avatar Mike Blumenkrantz

fix some segvs in eet_node


SVN revision: 60958
parent c4349599
......@@ -515,3 +515,4 @@
* Add functions to manipulate nodes:
eet_node_children_get, eet_node_next_get, eet_node_parent_get,
eet_node_type_get, eet_node_value_get, eet_node_name_get
* Fix segmentation faults in several eet_node functions
......@@ -213,6 +213,8 @@ eet_node_struct_child_new(const char *parent,
{
Eet_Node *n;
if (!child) return NULL;
if (child->type != EET_G_UNKNOWN)
return child;
......@@ -254,6 +256,7 @@ eet_node_list_append(Eet_Node *parent,
const char *tmp;
Eet_Node *nn;
if ((!parent) || (!child)) return;
tmp = eina_stringshare_add(name);
for (nn = parent->values; nn; nn = nn->next)
......@@ -296,6 +299,7 @@ eet_node_struct_append(Eet_Node *parent,
Eet_Node *prev;
Eet_Node *nn;
if ((!parent) || (!child)) return;
if (parent->type != EET_G_UNKNOWN)
{
ERR("[%s] is not a structure. Will not insert [%s] in it",
......@@ -343,6 +347,8 @@ eet_node_hash_add(Eet_Node *parent,
{
Eet_Node *nn;
if ((!parent) || (!child)) return;
/* No list found, so create it. */
nn = eet_node_hash_new(name, key, child);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment