summaryrefslogtreecommitdiff
path: root/parse/node.c
diff options
context:
space:
mode:
Diffstat (limited to 'parse/node.c')
-rw-r--r--parse/node.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/parse/node.c b/parse/node.c
index 62a6941..63d26c2 100644
--- a/parse/node.c
+++ b/parse/node.c
@@ -471,7 +471,10 @@ int nameeq(void *p1, void *p2)
void setns(Node *n, char *ns)
{
- assert(!n->name.ns || !strcmp(n->name.ns, ns));
+ assert(!ns || !n->name.ns || !strcmp(n->name.ns, ns));
+
+ if (!ns)
+ return;
n->name.ns = strdup(ns);
}