summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bindings/hubbub/parser.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/bindings/hubbub/parser.c b/bindings/hubbub/parser.c
index 6ee3004..1c0e03f 100644
--- a/bindings/hubbub/parser.c
+++ b/bindings/hubbub/parser.c
@@ -219,7 +219,10 @@ static hubbub_error create_element(void *parser, const hubbub_tag *tag,
}
}
- if (element != NULL && tag->n_attributes > 0) {
+ /* By now, we MUST have constructed an element */
+ assert(element != NULL);
+
+ if (tag->n_attributes > 0) {
herr = add_attributes(parser, element, tag->attributes,
tag->n_attributes);
if (herr != HUBBUB_OK)