diff options
| author | Frederic Peters <fpeters@entrouvert.com> | 2005-05-10 15:36:44 +0000 |
|---|---|---|
| committer | Frederic Peters <fpeters@entrouvert.com> | 2005-05-10 15:36:44 +0000 |
| commit | 71af2a442f28d4ce18a294179f01f5ab83fbfed9 (patch) | |
| tree | 8b9be77cc06033344e5b26de4ffe00105ce050f5 | |
| parent | 2e5523fd6cce6701acaa65cf9c8f24ce3b8092e7 (diff) | |
don't lasso_node_destroy list items that may be NULL
| -rw-r--r-- | lasso/xml/xml.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lasso/xml/xml.c b/lasso/xml/xml.c index 42df8198..59538b59 100644 --- a/lasso/xml/xml.c +++ b/lasso/xml/xml.c @@ -533,13 +533,13 @@ lasso_node_dispose(GObject *object) case SNIPPET_LIST_XMLNODES: elem = (GList*)(*value); while (elem) { - if (type == SNIPPET_LIST_XMLNODES) + if (type == SNIPPET_LIST_XMLNODES && elem->data) xmlFreeNode(elem->data); - if (type == SNIPPET_EXTENSION) + if (type == SNIPPET_EXTENSION && elem->data) xmlFreeNode(elem->data); - if (type == SNIPPET_LIST_NODES) + if (type == SNIPPET_LIST_NODES && elem->data) lasso_node_destroy(elem->data); - if (type == SNIPPET_LIST_CONTENT) + if (type == SNIPPET_LIST_CONTENT && elem->data) g_free(elem->data); elem = g_list_next(elem); } |
