summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2020-02-22 17:15:42 +0000
committerDaniel Silverstone <dsilvers@digital-scurf.org>2020-02-22 17:15:42 +0000
commit36937ce1ad1417b7ca08b565023dc345b168291d (patch)
tree2d91549ebb2733c655a622ed55e8d4e31791e7d2 /src
parent38c82c0d1e4474aff9b601fcf6ba9578396346b9 (diff)
downloadlibdom-36937ce1ad1417b7ca08b565023dc345b168291d.tar.gz
libdom-36937ce1ad1417b7ca08b565023dc345b168291d.tar.bz2
Node: Add a NULL guard to hopefully calm scan-build
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Diffstat (limited to 'src')
-rw-r--r--src/core/node.c2
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;
}