From 05b1325c09d344834d8c243b198871a7e2e95b72 Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Mon, 19 Oct 2009 01:03:22 +0200 Subject: [PATCH] Song: do not refresh FxMixerView when loading song in console mode Calling FxMixerView::refreshDisplay causes LMMS to crash when running in console mode. Therefore explicitely check GUI mode before calling this function. --- src/core/song.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/core/song.cpp b/src/core/song.cpp index 0d5e37c08..6b3ff3cc5 100644 --- a/src/core/song.cpp +++ b/src/core/song.cpp @@ -912,8 +912,11 @@ void song::loadProject( const QString & _file_name ) { engine::fxMixer()->restoreState( node.toElement() ); - // refresh FxMixerView - engine::fxMixerView()->refreshDisplay(); + if( engine::hasGUI() ) + { + // refresh FxMixerView + engine::fxMixerView()->refreshDisplay(); + } } node = node.nextSibling();