Make exact beat calculation of tempi a bit less cumbersome. Move tempi on an audio...
[ardour.git] / libs / fst / vstwin.c
index 27fb3cbead21af949eb87ed6361e4d21df356f61..3a1f624934eff4335ce4d2d126ded79204d740a5 100644 (file)
@@ -20,7 +20,10 @@ static unsigned int idle_id = 0;
 
 #endif
 
+#ifndef COMPILER_MSVC
 extern char * strdup (const char *);
+#endif
+
 #include <glib.h>
 #include "fst.h"
 
@@ -374,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);
@@ -421,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;