Avoid error raised in case of empty scala file
This commit is contained in:
parent
a369d61b78
commit
420237e8dc
1 changed files with 10 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue