Explicitely handle editor opening failures

This commit is contained in:
Robbert van der Helm
2020-03-17 20:54:49 +01:00
parent e7e1b26455
commit d0a86887d3
3 changed files with 66 additions and 50 deletions
+4
View File
@@ -132,6 +132,10 @@ PluginBridge::PluginBridge(std::string plugin_dll_path,
// the X11 window handle passed by the host
if (opcode == effEditOpen) {
const auto handle = editor.open();
// The plugin will return 0 if it can not open its
// editor window (or if it does not support it, but in
// that case the DAW should be hiding the option)
const intptr_t return_value = plugin->dispatcher(
plugin, opcode, index, value, handle, option);
if (return_value == 0) {