diff --git a/modules/juce_core/xml/juce_XmlElement.cpp b/modules/juce_core/xml/juce_XmlElement.cpp index 5939d9f12b..8d8e11e4f5 100644 --- a/modules/juce_core/xml/juce_XmlElement.cpp +++ b/modules/juce_core/xml/juce_XmlElement.cpp @@ -697,6 +697,8 @@ void XmlElement::removeChildElement (XmlElement* const childToRemove, { if (childToRemove != nullptr) { + jassert (containsChildElement (childToRemove)); + firstChildElement.remove (childToRemove); if (shouldDeleteTheChild)