Fixed double delete problem when removing and readding an attribute

This commit is contained in:
Jez Higgins 2010-01-01 23:03:01 +00:00
parent c7e49c5278
commit 7e62969c6c
2 changed files with 3 additions and 2 deletions

View file

@ -178,6 +178,7 @@ class NamedNodeMapImpl : public DOM::NamedNodeMap_impl<stringT, string_adaptorT>
NodeImplT* setNode(typename NodeListT::iterator n, NodeImplT* arg)
{
ownerDoc_->adopted(arg);
if(n == nodes_.end())
{
nodes_.push_back(arg);

View file

@ -107,8 +107,8 @@ TestSuite* NamedNodeMapTest_suite()
suiteOfTests->addTest(new TestCaller<NamedNodeMapTest<string_type, string_adaptor> >("test1", &NamedNodeMapTest<string_type, string_adaptor>::test1));
suiteOfTests->addTest(new TestCaller<NamedNodeMapTest<string_type, string_adaptor> >("test2", &NamedNodeMapTest<string_type, string_adaptor>::test2));
suiteOfTests->addTest(new TestCaller<NamedNodeMapTest<string_type, string_adaptor> >("test3", &NamedNodeMapTest<string_type, string_adaptor>::test3));
// suiteOfTests->addTest(new TestCaller<NamedNodeMapTest<string_type, string_adaptor> >("test4", &NamedNodeMapTest<string_type, string_adaptor>::test4));
//suiteOfTests->addTest(new TestCaller<NamedNodeMapTest<string_type, string_adaptor> >("test5", &NamedNodeMapTest<string_type, string_adaptor>::test5));
suiteOfTests->addTest(new TestCaller<NamedNodeMapTest<string_type, string_adaptor> >("test4", &NamedNodeMapTest<string_type, string_adaptor>::test4));
suiteOfTests->addTest(new TestCaller<NamedNodeMapTest<string_type, string_adaptor> >("test5", &NamedNodeMapTest<string_type, string_adaptor>::test5));
return suiteOfTests;
} // NamedNodeMapTest_suite