fix some segvs in eet_node

SVN revision: 60958
This commit is contained in:
Mike Blumenkrantz 2011-07-04 03:50:37 +00:00
parent c4349599a3
commit 015a2ca208
2 changed files with 7 additions and 0 deletions

View File

@ -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

View File

@ -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);