Add a missing check on message attributes

This commit is contained in:
Jean Pierre Cimalando 2020-06-20 11:26:10 +02:00 committed by Paul Ferrand
parent 429c98ee83
commit 35dc738e18

View file

@ -267,12 +267,20 @@ tresult SfizzVstController::notify(Vst::IMessage* message)
const void* data = nullptr;
uint32 size = 0;
result = attr->getBinary("File", data, size);
if (result != kResultTrue)
return result;
_state.sfzFile.assign(static_cast<const char *>(data), size);
}
else if (!strcmp(id, "LoadedScala")) {
const void* data = nullptr;
uint32 size = 0;
result = attr->getBinary("File", data, size);
if (result != kResultTrue)
return result;
_state.scalaFile.assign(static_cast<const char *>(data), size);
}