diff --git a/gtk2_ardour/editor_snapshots.cc b/gtk2_ardour/editor_snapshots.cc index fc6faf847a..9661916fa5 100644 --- a/gtk2_ardour/editor_snapshots.cc +++ b/gtk2_ardour/editor_snapshots.cc @@ -84,6 +84,10 @@ EditorSnapshots::button_press (GdkEventButton* ev) int cx; int cy; _snapshot_display.get_path_at_pos ((int) ev->x, (int) ev->y, path, col, cx, cy); + if (!path) { + return false; + } + _snapshot_display.get_selection()->select (path); Gtk::TreeModel::iterator iter = _snapshot_model->get_iter (path); if (iter) { Gtk::TreeModel::Row row = *iter; @@ -97,6 +101,9 @@ EditorSnapshots::button_press (GdkEventButton* ev) int cy; string snap_name; _snapshot_display.get_path_at_pos ((int) ev->x, (int) ev->y, path, col, cx, cy); + if (!path) { + return false; + } Gtk::TreeModel::iterator iter = _snapshot_model->get_iter (path); if (iter) { Gtk::TreeModel::Row row = *iter;