1
1
mirror of https://github.com/danbee/persephone synced 2025-03-04 08:39:11 +00:00

Only remove a song if we have a selection

This commit is contained in:
Daniel Barber 2020-10-09 15:17:54 -04:00
parent 92f894be94
commit ea1793df51
Signed by: danbarber
GPG Key ID: 931D8112E0103DD8

View File

@ -44,7 +44,9 @@ class QueueViewController: NSViewController {
case NSEvent.keyCodeBS:
let queuePos = queueView.selectedRow
App.mpdClient.removeSong(at: queuePos)
if queuePos >= 0 {
App.mpdClient.removeSong(at: queuePos)
}
default:
nextResponder?.keyDown(with: event)
}