[lasem] dom_node: allow NULL as new_child in insert_before.
- From: Emmanuel Pacaud <emmanuel src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [lasem] dom_node: allow NULL as new_child in insert_before.
- Date: Sun, 14 Nov 2010 17:24:03 +0000 (UTC)
commit 3360bb23082640ea193c856d40d800b7913d6687
Author: Emmanuel Pacaud <emmanuel gnome org>
Date: Sun Nov 14 18:23:34 2010 +0100
dom_node: allow NULL as new_child in insert_before.
src/lsmdomnode.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/lsmdomnode.c b/src/lsmdomnode.c
index cc4101b..673f942 100644
--- a/src/lsmdomnode.c
+++ b/src/lsmdomnode.c
@@ -223,6 +223,11 @@ lsm_dom_node_replace_child (LsmDomNode* self, LsmDomNode* new_child, LsmDomNode*
lsm_dom_node_remove_child (self, old_child);
+ if (new_child == NULL)
+ return NULL;
+
+ g_return_val_if_fail (LSM_IS_DOM_NODE (new_child), NULL);
+
if (next_sibling == NULL)
return lsm_dom_node_append_child (self, new_child);
else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]