lib: implement check for empty data buffer

Fixes occasional crash
This commit is contained in:
itsmattkc 2022-07-18 20:22:15 -07:00
parent 91de5a7df4
commit dad9295d01

View file

@ -138,6 +138,10 @@ bool Object::ReplaceWithFile(FileBase *f)
bool Object::ExtractToFile(FileBase *f) const bool Object::ExtractToFile(FileBase *f) const
{ {
if (data_.empty()) {
return false;
}
switch (this->filetype()) { switch (this->filetype()) {
case MxOb::WAV: case MxOb::WAV:
{ {