From a096b4f707ebdc1160def8d7a9344ccaf0eaa684 Mon Sep 17 00:00:00 2001 From: ed Date: Fri, 8 Feb 2019 09:24:02 +0000 Subject: [PATCH] Added an assertion to XmlElement::removeChildElement() to check that childToRemove is actually a child of the XmlElement --- modules/juce_core/xml/juce_XmlElement.cpp | 2 ++ 1 file changed, 2 insertions(+) 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)