diff options
author | Tim Mayberry <mojofunk@gmail.com> | 2015-08-12 08:08:45 +1000 |
---|---|---|
committer | Tim Mayberry <mojofunk@gmail.com> | 2015-08-12 11:39:28 +1000 |
commit | 3a1a97854195b29a5d3994102a468e50e85c24e8 (patch) | |
tree | a3940e739b5a428cbb633a8511372776e393ae99 /libs/fst | |
parent | ad9cebe2474354b9e11ea3a9e3521f1aa98c561a (diff) |
Fix for crash when loading DrumGizmo VST editor on Windows
Diffstat (limited to 'libs/fst')
-rw-r--r-- | libs/fst/vstwin.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libs/fst/vstwin.c b/libs/fst/vstwin.c index fe0afa7593..3a1f624934 100644 --- a/libs/fst/vstwin.c +++ b/libs/fst/vstwin.c @@ -377,7 +377,7 @@ fst_run_editor (VSTState* fst, void* window_parent) if (fst->windows_window == NULL) { HMODULE hInst; HWND window; - struct ERect* er; + struct ERect* er = NULL; if (!(fst->plugin->flags & effFlagsHasEditor)) { 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, effEditGetRect, 0, 0, &er, 0 ); - fst->width = er->right-er->left; - fst->height = er->bottom-er->top; - + if (er != NULL) { + fst->width = er->right - er->left; + fst->height = er->bottom - er->top; + } fst->been_activated = TRUE; |