From 39ce151636238fa9a2e4e587db461546f6637aca Mon Sep 17 00:00:00 2001 From: hogliux Date: Wed, 16 Aug 2017 10:52:12 +0100 Subject: [PATCH] Plugin Host: Fixed a potential crash when creating a new document --- examples/audio plugin host/Source/GraphEditorPanel.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/audio plugin host/Source/GraphEditorPanel.cpp b/examples/audio plugin host/Source/GraphEditorPanel.cpp index 18cdf6efb0..9d92fd3c7c 100644 --- a/examples/audio plugin host/Source/GraphEditorPanel.cpp +++ b/examples/audio plugin host/Source/GraphEditorPanel.cpp @@ -849,8 +849,9 @@ void GraphEditorPanel::changeListenerCallback (ChangeBroadcaster*) void GraphEditorPanel::updateComponents() { - for (auto* child : getChildren()) - if (auto* fc = dynamic_cast (child)) + auto children = getChildren(); + for (auto child : children) + if (auto* fc = dynamic_cast (static_cast (child))) fc->update(); for (int i = getNumChildComponents(); --i >= 0;)