Possibly fix crash when creating a new format profile
authorCarl Hetherington <carl@carlh.net>
Tue, 8 May 2012 01:49:35 +0000 (01:49 +0000)
committerCarl Hetherington <carl@carlh.net>
Tue, 8 May 2012 01:49:35 +0000 (01:49 +0000)
when there are none existing.

git-svn-id: svn://localhost/ardour2/branches/3.0@12206 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/export_format_selector.cc

index d3ffce936a67867618724c6df17533f4f602ebfe..146b31ab51c3fbc1bb413df1b8d0c4417d973f80 100644 (file)
@@ -96,7 +96,7 @@ ExportFormatSelector::update_format_list ()
                tree_it->set_value (format_cols.label, (*it)->description());
        }
 
-       if (format_combo.get_active_row_number() == -1) {
+       if (format_combo.get_active_row_number() == -1 && format_combo.get_model()->children().size() > 0) {
                format_combo.set_active (0);
        }