Add a missing check on message attributes
This commit is contained in:
parent
429c98ee83
commit
35dc738e18
1 changed files with 8 additions and 0 deletions
|
|
@ -267,12 +267,20 @@ tresult SfizzVstController::notify(Vst::IMessage* message)
|
||||||
const void* data = nullptr;
|
const void* data = nullptr;
|
||||||
uint32 size = 0;
|
uint32 size = 0;
|
||||||
result = attr->getBinary("File", data, size);
|
result = attr->getBinary("File", data, size);
|
||||||
|
|
||||||
|
if (result != kResultTrue)
|
||||||
|
return result;
|
||||||
|
|
||||||
_state.sfzFile.assign(static_cast<const char *>(data), size);
|
_state.sfzFile.assign(static_cast<const char *>(data), size);
|
||||||
}
|
}
|
||||||
else if (!strcmp(id, "LoadedScala")) {
|
else if (!strcmp(id, "LoadedScala")) {
|
||||||
const void* data = nullptr;
|
const void* data = nullptr;
|
||||||
uint32 size = 0;
|
uint32 size = 0;
|
||||||
result = attr->getBinary("File", data, size);
|
result = attr->getBinary("File", data, size);
|
||||||
|
|
||||||
|
if (result != kResultTrue)
|
||||||
|
return result;
|
||||||
|
|
||||||
_state.scalaFile.assign(static_cast<const char *>(data), size);
|
_state.scalaFile.assign(static_cast<const char *>(data), size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue