MainWindow: explicitely destroy ResourceBrowser instance
Explicitely destroy instance of ResourceBrowser in destructor of MainWindow. This fixes crash at exit due to auto-deletion mechanisms after the whole engine already has been shutdown. Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* main_window.h - declaration of class mainWindow, the main window of LMMS
|
||||
*
|
||||
* Copyright (c) 2004-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2004-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -39,6 +39,7 @@ class QMdiArea;
|
||||
class QCheckBox;
|
||||
class QRadioButton;
|
||||
|
||||
class ResourceBrowser;
|
||||
class lcdSpinBox;
|
||||
class meterDialog;
|
||||
class automatableSlider;
|
||||
@@ -200,6 +201,7 @@ private:
|
||||
|
||||
QBasicTimer m_updateTimer;
|
||||
|
||||
ResourceBrowser * m_resourceBrowser;
|
||||
|
||||
friend class engine;
|
||||
|
||||
|
||||
@@ -109,7 +109,8 @@ mainWindow::mainWindow( void ) :
|
||||
side_bar->appendTab( new pluginBrowser( splitter ), ++id );
|
||||
|
||||
// add a resource browser to sidebar
|
||||
side_bar->appendTab( new ResourceBrowser( splitter ), ++id );
|
||||
m_resourceBrowser = new ResourceBrowser( splitter );
|
||||
side_bar->appendTab( m_resourceBrowser, ++id );
|
||||
|
||||
|
||||
m_workspace = new QMdiArea( splitter );
|
||||
@@ -195,6 +196,9 @@ mainWindow::~mainWindow()
|
||||
delete *it;
|
||||
delete m;
|
||||
}
|
||||
|
||||
delete m_resourceBrowser;
|
||||
|
||||
// TODO: Close tools
|
||||
// destroy engine which will do further cleanups etc.
|
||||
engine::destroy();
|
||||
|
||||
Reference in New Issue
Block a user