diff --git a/src/core/main.cpp b/src/core/main.cpp index 07a478feed5..966bd03e17f 100644 --- a/src/core/main.cpp +++ b/src/core/main.cpp @@ -538,15 +538,18 @@ int main( int argc, char * * argv ) // Test file argument before continuing QFileInfo fileInfo( fileToLoad ); - if ( !fileInfo.exists() || !fileInfo.isFile() ) + if( !fileToLoad.isEmpty() ) { - printf("The file %s does not exist!\n", fileToLoad.toStdString().c_str()); - exit( 1 ); - } - else if( ! ( fileInfo.suffix() == "mmp" || fileInfo.suffix() == "mmpz" ) ) - { - printf("%s is not an LMMS project file!\n", fileToLoad.toStdString().c_str()); - exit( 1 ); + if ( !fileInfo.exists() || !fileInfo.isFile() ) + { + printf("The file %s does not exist!\n", fileToLoad.toStdString().c_str()); + exit( 1 ); + } + else if( ! ( fileInfo.suffix() == "mmp" || fileInfo.suffix() == "mmpz" ) ) + { + printf("%s is not an LMMS project file!\n", fileToLoad.toStdString().c_str()); + exit( 1 ); + } } ConfigManager::inst()->loadConfigFile();