mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-26 08:27:43 +01:00
fix crash when clicking on region view list column that has no region pointer associated with it
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@1885 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
ead3796ade
commit
84d2b0a5b0
1 changed files with 12 additions and 5 deletions
|
|
@ -231,12 +231,19 @@ Editor::region_list_selection_changed()
|
|||
TreeView::Selection::ListHandle_Path::iterator i = rows.begin();
|
||||
TreeIter iter;
|
||||
|
||||
/* just set the first selected region (in fact, the selection model might be SINGLE, which
|
||||
means there can only be one.
|
||||
*/
|
||||
|
||||
if ((iter = region_list_model->get_iter (*i))) {
|
||||
set_selected_regionview_from_region_list (((*iter)[region_list_columns.region]), Selection::Set);
|
||||
boost::shared_ptr<Region> r = (*iter)[region_list_columns.region];
|
||||
|
||||
/* they could have clicked on a row that is just a placeholder, like "Hidden" */
|
||||
|
||||
if (r) {
|
||||
|
||||
/* just set the first selected region (in fact, the selection model might be SINGLE, which
|
||||
means there can only be one.
|
||||
*/
|
||||
|
||||
set_selected_regionview_from_region_list (r, Selection::Set);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue