From c6cc20542536f981439dc0fc0f81e9a3bfb24f23 Mon Sep 17 00:00:00 2001 From: alexmitchell Date: Wed, 12 Feb 2020 15:59:37 +1030 Subject: [PATCH] Stop sfizz from crashing host (ardour) if no SFZ file is loaded and project is reloaded --- src/sfizz/Parser.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sfizz/Parser.cpp b/src/sfizz/Parser.cpp index b24aaca7..f24dfc61 100644 --- a/src/sfizz/Parser.cpp +++ b/src/sfizz/Parser.cpp @@ -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;