Browse Source

Made the juce demo clean up in the right order when quitting, to avoid problems with the GL demo.

tags/2021-05-28
jules 10 years ago
parent
commit
c6dcbe5739
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      extras/Demo/Source/MainWindow.cpp

+ 6
- 0
extras/Demo/Source/MainWindow.cpp View File

@@ -117,6 +117,11 @@ public:
demoList.selectRow (0); demoList.selectRow (0);
} }
void clearCurrentDemo()
{
currentDemo = nullptr;
}
void resized() override void resized() override
{ {
Rectangle<int> r (getLocalBounds()); Rectangle<int> r (getLocalBounds());
@@ -509,6 +514,7 @@ MainAppWindow::MainAppWindow()
MainAppWindow::~MainAppWindow() MainAppWindow::~MainAppWindow()
{ {
contentComponent->clearCurrentDemo();
clearContentComponent(); clearContentComponent();
contentComponent = nullptr; contentComponent = nullptr;
applicationCommandManager = nullptr; applicationCommandManager = nullptr;


Loading…
Cancel
Save