mirror of
https://github.com/jezhiggins/arabica
synced 2025-01-30 08:38:15 +01:00
fixed segfault when created doctype before owner doc has been set
This commit is contained in:
parent
74f8a55ed4
commit
5ec2316aa5
1 changed files with 2 additions and 1 deletions
|
@ -178,7 +178,8 @@ class NamedNodeMapImpl : public DOM::NamedNodeMap_impl<stringT, string_adaptorT>
|
|||
|
||||
NodeImplT* setNode(typename NodeListT::iterator n, NodeImplT* arg)
|
||||
{
|
||||
ownerDoc_->adopted(arg);
|
||||
if(ownerDoc_)
|
||||
ownerDoc_->adopted(arg);
|
||||
if(n == nodes_.end())
|
||||
{
|
||||
nodes_.push_back(arg);
|
||||
|
|
Loading…
Add table
Reference in a new issue