@@ -42,8 +42,8 @@ public class Settings
4242{
4343 public static boolean firstBoot = true ; //stays true after settings load on first boot
4444 public static boolean hasSetLanguageAsSystemLanguage = false ;
45- private static List <String > recentPlugins ;
46- private static List <String > recentFiles ;
45+ private static List <String > recentPlugins = new ArrayList <>() ;
46+ private static List <String > recentFiles = new ArrayList <>() ;
4747
4848 //decompilers will automatically delete their temp files, useful to turn off if you want to quickly debug a decompilers results
4949 public static boolean DECOMPILERS_AUTOMATICALLY_CLEANUP = true ;
@@ -53,15 +53,18 @@ public class Settings
5353 {
5454 try
5555 {
56+ File filesFile = new File (getBCVDirectory () + FS + "recentfiles.bcv" );
57+ File pluginsFile = new File (getBCVDirectory () + FS + "recentplugins.bcv" );
58+
5659 if (new File (FILES_NAME ).exists ())
5760 recentFiles = gson .fromJson (DiskReader .readString (FILES_NAME ), new TypeToken <ArrayList <String >>() {}.getType ());
58- else
59- recentFiles = Arrays .asList (DiskReader .readArray (getBCVDirectory () + FS + "recentfiles.bcv" ));
61+ else if ( filesFile . exists ())
62+ recentFiles = Arrays .asList (DiskReader .readArray (filesFile ));
6063
6164 if (new File (PLUGINS_NAME ).exists ())
6265 recentPlugins = gson .fromJson (DiskReader .readString (PLUGINS_NAME ), new TypeToken <ArrayList <String >>() {}.getType ());
63- else
64- recentPlugins = Arrays .asList (DiskReader .readArray (getBCVDirectory () + FS + "recentplugins.bcv" ));
66+ else if ( pluginsFile . exists ())
67+ recentPlugins = Arrays .asList (DiskReader .readArray (pluginsFile ));
6568
6669 MiscUtils .deduplicateAndTrim (recentFiles , maxRecentFiles );
6770 MiscUtils .deduplicateAndTrim (recentPlugins , maxRecentFiles );
0 commit comments