summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/pugixml.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pugixml.cpp b/src/pugixml.cpp
index ad39ba7..ffefdd5 100644
--- a/src/pugixml.cpp
+++ b/src/pugixml.cpp
@@ -2426,7 +2426,7 @@ namespace pugi
void xml_node::remove_attribute(const xml_attribute& a)
{
- if (!_root) return;
+ if (!_root || !a._attr) return;
// check that attribute belongs to *this
xml_attribute_struct* attr = a._attr;