From c6dcbe57392d45eff9c584377ea6e085c9536fa1 Mon Sep 17 00:00:00 2001 From: jules Date: Mon, 11 Aug 2014 22:09:43 +0100 Subject: [PATCH] Made the juce demo clean up in the right order when quitting, to avoid problems with the GL demo. --- extras/Demo/Source/MainWindow.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/extras/Demo/Source/MainWindow.cpp b/extras/Demo/Source/MainWindow.cpp index b2950419c0..9c1eaf9bd1 100644 --- a/extras/Demo/Source/MainWindow.cpp +++ b/extras/Demo/Source/MainWindow.cpp @@ -117,6 +117,11 @@ public: demoList.selectRow (0); } + void clearCurrentDemo() + { + currentDemo = nullptr; + } + void resized() override { Rectangle r (getLocalBounds()); @@ -509,6 +514,7 @@ MainAppWindow::MainAppWindow() MainAppWindow::~MainAppWindow() { + contentComponent->clearCurrentDemo(); clearContentComponent(); contentComponent = nullptr; applicationCommandManager = nullptr;