diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/core/document.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/document.c b/src/core/document.c index 8f316ff..22f08f1 100644 --- a/src/core/document.c +++ b/src/core/document.c @@ -820,6 +820,9 @@ dom_exception _dom_document_get_element_by_id(dom_document *doc, err = _dom_find_element_by_id(root, id, result); dom_node_unref(root); + if (*result != NULL) + dom_node_ref(*result); + return err; } |