From 10d5548155462be640e065ff5ca3e11785f1c421 Mon Sep 17 00:00:00 2001 From: Sorgelig Date: Sat, 23 Jul 2022 21:53:34 +0800 Subject: [PATCH] menu: fix crash if folder is empty. --- menu.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/menu.cpp b/menu.cpp index 3ad06e3..f1e97e0 100644 --- a/menu.cpp +++ b/menu.cpp @@ -4654,7 +4654,7 @@ void HandleUI(void) OsdSetTitle((fs_Options & SCANO_CORES) ? "Cores" : "Select", 0); PrintDirectory(hold_cnt<2); menustate = MENU_FILE_SELECT2; - if (cfg.log_file_entry) + if (cfg.log_file_entry && flist_nDirEntries()) { //Write out paths infos for external integration FILE* filePtr = fopen("/tmp/CURRENTPATH", "w");