fix for crashing bug with empty panners
authorPaul Davis <paul@linuxaudiosystems.com>
Mon, 26 Oct 2009 20:08:00 +0000 (20:08 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Mon, 26 Oct 2009 20:08:00 +0000 (20:08 +0000)
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@5927 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/panner_ui.cc

index ed482e37269346d1990eccbbe140807eda81ca67..1974f72821de57975f93a62cdd3dff7910e88774 100644 (file)
@@ -204,6 +204,10 @@ PannerUI::build_astyle_menu ()
 PBD::Controllable* 
 PannerUI::get_controllable() 
 { 
+       if (pan_bars.empty()) {
+               return 0;
+       }
+
        return pan_bars[0]->get_controllable();
 }