Fix potential issue with plugins reporting size

I thought this was a problem for a plugin when it was not, but I can
still see this being a source of segfaults.
This commit is contained in:
Robbert van der Helm
2020-05-11 22:54:26 +02:00
parent 33e5d2bd56
commit 901d985080
3 changed files with 25 additions and 7 deletions
+6 -1
View File
@@ -342,7 +342,12 @@ class DispatchDataConverter : DefaultDataConverter {
update_aeffect(plugin, updated_plugin);
} break;
case effEditGetRect: {
// Write back the (hopefully) updated editor dimensions
// Either the plugin will have returned (a pointer to) their
// editor dimensions, or they will not have written anything.
if (std::holds_alternative<std::nullptr_t>(response.payload)) {
return;
}
const auto new_rect = std::get<VstRect>(response.payload);
rect = new_rect;