From 17e9f1ea45d14b177d895e8075bfbefdd7ea761f Mon Sep 17 00:00:00 2001 From: Stian Skjelstad Date: Mon, 16 Dec 2024 00:25:45 +0100 Subject: [PATCH] Avoid assertion if listing all files and attempting to hit ENTER on a non-music file. --- filesel/pfilesel.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/filesel/pfilesel.c b/filesel/pfilesel.c index 42959f6b..1b284b5b 100644 --- a/filesel/pfilesel.c +++ b/filesel/pfilesel.c @@ -3573,8 +3573,11 @@ signed int fsFileSelect(void) /* We delay mdbScan for remote files until this stage */ if (m && m->file && (m->file->compression >= COMPRESSION_REMOTE) && !(m->flags & MODLIST_FLAG_SCANNED)) { - mdbScan (m->file, m->mdb_ref, 0); - m->flags |= MODLIST_FLAG_SCANNED; + if (m->mdb_ref != UINT32_MAX) /* just in-case fsShowAllFiles added this file */ + { + mdbScan (m->file, m->mdb_ref, 0); + m->flags |= MODLIST_FLAG_SCANNED; + } } if (win) {