A band aid for plugin editor related crash. Something needs to be
authorSampo Savolainen <v2@iki.fi>
Sun, 12 Feb 2006 15:40:58 +0000 (15:40 +0000)
committerSampo Savolainen <v2@iki.fi>
Sun, 12 Feb 2006 15:40:58 +0000 (15:40 +0000)
figured out which does not include locking between the GUI and the RT
thread.

git-svn-id: svn://localhost/trunk/ardour2@319 d708f5d6-7413-0410-9779-e7cbd77b26cf

libs/ardour/insert.cc

index 3ef84d1481b7c98a54248eebdf92f2fb1010df3e..1c73ef9d79c9a061eb15853f27e7c8c5e4c92015 100644 (file)
@@ -320,14 +320,14 @@ void
 PluginInsert::automation_snapshot (jack_nframes_t now)
 {
        map<uint32_t,AutomationList*>::iterator li;
-
+       
        for (li = parameter_automation.begin(); li != parameter_automation.end(); ++li) {
                
-               AutomationList& alist (*((*li).second));
-               if (alist.automation_write ()) {
+               AutomationList *alist = ((*li).second);
+               if (alist != 0 && alist->automation_write ()) {
                        
                        float val = _plugins[0]->get_parameter ((*li).first);
-                       alist.rt_add (now, val);
+                       alist->rt_add (now, val);
                        last_automation_snapshot = now;
                }
        }