From e3ba0169eae10a705ede011cd69667f0013630cc Mon Sep 17 00:00:00 2001 From: krolxon Date: Fri, 24 May 2024 15:04:26 +0530 Subject: [PATCH] fix #5 --- src/event/pl_append_keys.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/event/pl_append_keys.rs b/src/event/pl_append_keys.rs index 57721c0..8460301 100755 --- a/src/event/pl_append_keys.rs +++ b/src/event/pl_append_keys.rs @@ -18,6 +18,12 @@ pub fn hande_pl_append_keys(key_event: KeyEvent, app: &mut App) -> AppResult<()> match app.selected_tab { SelectedTab::Queue => { + // Just exit out the menu if no item is selected in the Queue + if app.queue_list.list.is_empty() { + app.playlist_popup = false; + return Ok(()); + } + let short_path = &app.queue_list.get_item_at_current_index().file; if let Some(full_path) = app.conn.get_full_path(short_path) {