Skip to content

Commit

Permalink
Merge pull request mixxxdj#11770 from ronso0/crate-delete-assert
Browse files Browse the repository at this point in the history
Crates: only store or activate sibling crate if it's valid
  • Loading branch information
daschuer authored Jul 28, 2023
2 parents fe25d77 + d98ae96 commit 2792dea
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/library/trackset/crate/cratefeature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -877,7 +877,9 @@ void CrateFeature::slotCrateTableChanged(CrateId crateId) {
if (!activateCrate(m_crateTableModel.selectedCrate())) {
// probably last clicked crate was deleted, try to
// select the stored sibling
activateCrate(m_prevSiblingCrate);
if (m_prevSiblingCrate.isValid()) {
activateCrate(m_prevSiblingCrate);
}
}
} else {
// No valid selection to restore
Expand Down

0 comments on commit 2792dea

Please sign in to comment.