Merge pull request #1616 from badosu/fix-cli-export-crashes

Fix export crashes adding gui checks
This commit is contained in:
Lukas W committed 2015-01-13 10:32:17 +01:00
commit 8e42b5ec01
2 files changed
+9 -8

No files matched your search

+8 -7
View File
@@ -759,15 +759,16 @@ void Song::clearProject()
Engine::mixer()->lock();
if( gui->getBBEditor() )
if( gui && gui->getBBEditor() )
{
gui->getBBEditor()->trackContainerView()->clearAllTracks();
}
if( gui->songEditor() )
if( gui && gui->songEditor() )
{
gui->songEditor()->m_editor->clearAllTracks();
}
if( gui->fxMixerView() )
if( gui && gui->fxMixerView() )
{
gui->fxMixerView()->clear();
}
@@ -777,12 +778,12 @@ void Song::clearProject()
Engine::fxMixer()->clear();
if( gui->automationEditor() )
if( gui && gui->automationEditor() )
{
gui->automationEditor()->setCurrentPattern( NULL );
}
if( gui->pianoRoll() )
if( gui && gui->pianoRoll() )
{
gui->pianoRoll()->reset();
}
@@ -800,7 +801,7 @@ void Song::clearProject()
Engine::mixer()->unlock();
if( gui->getProjectNotes() )
if( gui && gui->getProjectNotes() )
{
gui->getProjectNotes()->clear();
}
@@ -1044,7 +1045,7 @@ void Song::loadProject( const QString & _file_name )
m_loadingProject = false;
m_modified = false;
if( gui->mainWindow() )
if( gui && gui->mainWindow() )
{
gui->mainWindow()->resetWindowTitle();
}
+1 -1
View File
@@ -585,7 +585,7 @@ void Pattern::updateBBTrack()
Engine::getBBTrackContainer()->updateBBTrack( this );
}
if( gui->pianoRoll() && gui->pianoRoll()->currentPattern() == this )
if( gui && gui->pianoRoll() && gui->pianoRoll()->currentPattern() == this )
{
gui->pianoRoll()->update();
}