diff --git a/src/sfizz/Tuning.cpp b/src/sfizz/Tuning.cpp index 6926ba5f..4f14acb8 100644 --- a/src/sfizz/Tuning.cpp +++ b/src/sfizz/Tuning.cpp @@ -177,6 +177,11 @@ bool Tuning::loadScalaFile(const fs::path& path) return false; } + if (scl.count <= 0) { + DBG("The scale file is empty: " << path); + return false; + } + impl_->updateScale(scl, path); return true; } @@ -194,6 +199,11 @@ bool Tuning::loadScalaString(const std::string& text) return false; } + if (scl.count <= 0) { + DBG("The scale file is empty: " << path); + return false; + } + impl_->updateScale(scl); return true; }