fix for Route::shift/insert-time
authorPaul Davis <paul@linuxaudiosystems.com>
Wed, 8 Dec 2010 23:22:01 +0000 (23:22 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Wed, 8 Dec 2010 23:22:01 +0000 (23:22 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@8225 d708f5d6-7413-0410-9779-e7cbd77b26cf

libs/ardour/route.cc

index 5de42c0b96f4fb49d87c28ad26a8c0142071e82a..55b3a59f51cf8f5070fdb92ec751863bfb3def13 100644 (file)
@@ -3249,11 +3249,13 @@ Route::shift (framepos_t pos, framecnt_t frames)
 
                 for (uint32_t p = 0; p < npans; ++p) {
                         pc = _main_outs->panner()->pan_control (0, p);
-                        boost::shared_ptr<AutomationList> al = pc->alist();
-                        XMLNode& before = al->get_state ();
-                        al->shift (pos, frames);
-                        XMLNode& after = al->get_state ();
-                        _session.add_command (new MementoCommand<AutomationList> (*al.get(), &before, &after));
+                        if (pc) {
+                                boost::shared_ptr<AutomationList> al = pc->alist();
+                                XMLNode& before = al->get_state ();
+                                al->shift (pos, frames);
+                                XMLNode& after = al->get_state ();
+                                _session.add_command (new MementoCommand<AutomationList> (*al.get(), &before, &after));
+                        }
                 }
         }