Fixed xml_node::remove_attribute in case of empty attribute as a parameter

git-svn-id: http://pugixml.googlecode.com/svn/trunk@151 99668b35-9821-0410-8761-19e4c4f06640
This commit is contained in:
arseny.kapoulkine 2009-10-12 10:34:49 +00:00
parent 8cc555de36
commit 9c7d93817e

View File

@ -2426,7 +2426,7 @@ namespace pugi
void xml_node::remove_attribute(const xml_attribute& a) void xml_node::remove_attribute(const xml_attribute& a)
{ {
if (!_root) return; if (!_root || !a._attr) return;
// check that attribute belongs to *this // check that attribute belongs to *this
xml_attribute_struct* attr = a._attr; xml_attribute_struct* attr = a._attr;