From 5edf41737e8948118b48c740d4184fec75f5de38 Mon Sep 17 00:00:00 2001 From: jules Date: Mon, 9 Jul 2012 15:19:19 +0100 Subject: [PATCH] Minor fix in ValueTree. --- modules/juce_data_structures/values/juce_ValueTree.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/juce_data_structures/values/juce_ValueTree.cpp b/modules/juce_data_structures/values/juce_ValueTree.cpp index 199b7a620b..efd4a7a9c1 100644 --- a/modules/juce_data_structures/values/juce_ValueTree.cpp +++ b/modules/juce_data_structures/values/juce_ValueTree.cpp @@ -304,7 +304,7 @@ public: } else { - if (index < 0) + if (! isPositiveAndBelow (index, children.size())) index = children.size(); undoManager->perform (new AddOrRemoveChildAction (this, index, child));