diff --git a/src/core/sample_buffer.cpp b/src/core/sample_buffer.cpp index 065ad846f..7f935a543 100644 --- a/src/core/sample_buffer.cpp +++ b/src/core/sample_buffer.cpp @@ -277,14 +277,17 @@ void sampleBuffer::update( bool _keep_settings ) // TODO: this list probably shouldn't be hardcoded QString decoders = niceListOfExts(); - QMessageBox::information( NULL, - QObject::tr( "Unrecognized audio format" ), - QObject::tr( "None of the available audio decoders " - "recognized the format you are trying to load. Try " - "converting the file to a format LMMS understands.\n\n" - "Your file: %1\n" - "Available decoders: %2\n").arg( file, decoders ), - QMessageBox::Ok | QMessageBox::Default ); + if( engine::hasGUI() ) + { + QMessageBox::information( NULL, + QObject::tr( "Unrecognized audio format" ), + QObject::tr( "None of the available audio decoders " + "recognized the format you are trying to load. Try " + "converting the file to a format LMMS understands.\n\n" + "Your file: %1\n" + "Available decoders: %2\n").arg( file, decoders ), + QMessageBox::Ok | QMessageBox::Default ); + } } }