Fix for crash when loading DrumGizmo VST editor on Windows
This commit is contained in:
parent
ad9cebe247
commit
3a1a978541
@ -377,7 +377,7 @@ fst_run_editor (VSTState* fst, void* window_parent)
|
|||||||
if (fst->windows_window == NULL) {
|
if (fst->windows_window == NULL) {
|
||||||
HMODULE hInst;
|
HMODULE hInst;
|
||||||
HWND window;
|
HWND window;
|
||||||
struct ERect* er;
|
struct ERect* er = NULL;
|
||||||
|
|
||||||
if (!(fst->plugin->flags & effFlagsHasEditor)) {
|
if (!(fst->plugin->flags & effFlagsHasEditor)) {
|
||||||
fst_error ("Plugin \"%s\" has no editor", fst->handle->name);
|
fst_error ("Plugin \"%s\" has no editor", fst->handle->name);
|
||||||
@ -424,9 +424,10 @@ fst_run_editor (VSTState* fst, void* window_parent)
|
|||||||
fst->plugin->dispatcher (fst->plugin, effEditOpen, 0, 0, fst->windows_window, 0 );
|
fst->plugin->dispatcher (fst->plugin, effEditOpen, 0, 0, fst->windows_window, 0 );
|
||||||
fst->plugin->dispatcher (fst->plugin, effEditGetRect, 0, 0, &er, 0 );
|
fst->plugin->dispatcher (fst->plugin, effEditGetRect, 0, 0, &er, 0 );
|
||||||
|
|
||||||
fst->width = er->right-er->left;
|
if (er != NULL) {
|
||||||
fst->height = er->bottom-er->top;
|
fst->width = er->right - er->left;
|
||||||
|
fst->height = er->bottom - er->top;
|
||||||
|
}
|
||||||
|
|
||||||
fst->been_activated = TRUE;
|
fst->been_activated = TRUE;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user