diff options
-rw-r--r-- | src/core/node.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/node.c b/src/core/node.c index 9ba277e..b471725 100644 --- a/src/core/node.c +++ b/src/core/node.c @@ -2218,7 +2218,7 @@ void _dom_node_replace(dom_node_internal *old, else old->parent->last_child = last; - for (n = first; n != last->next; n = n->next) { + for (n = first; n != NULL && n != last->next; n = n->next) { n->parent = old->parent; } |