Stop sfizz from crashing host (ardour) if no SFZ file is loaded and project is reloaded

This commit is contained in:
alexmitchell 2020-02-12 15:59:37 +10:30 committed by Jean Pierre Cimalando
parent 9eddd5f649
commit c6cc205425

View file

@ -23,7 +23,8 @@ bool sfz::Parser::loadSfzFile(const fs::path& file)
{
includedFiles.clear();
const auto sfzFile = file.is_absolute() ? file : originalDirectory / file;
const auto sfzFile =
(file.empty() || file.is_absolute()) ? file : originalDirectory / file;
if (!fs::exists(sfzFile))
return false;