X-Git-Url: https://code.delx.au/refind/blobdiff_plain/1a20b0a72c2e35ab33246c6886d39e8e0d0c10d7..119f040f3c096ef2ab59f5d02059e9d872047dcd:/refind/config.c diff --git a/refind/config.c b/refind/config.c index 81f87dd..12375c4 100644 --- a/refind/config.c +++ b/refind/config.c @@ -348,15 +348,16 @@ VOID ReadConfig(CHAR16 *FileName) if (StriCmp(FileName, CONFIG_FILE_NAME) == 0) { MyFreePool(GlobalConfig.AlsoScan); GlobalConfig.AlsoScan = StrDuplicate(ALSO_SCAN_DIRS); -// MyFreePool(GlobalConfig.DontScanVolumes); -// GlobalConfig.DontScanVolumes = StrDuplicate(L" "); MyFreePool(GlobalConfig.DontScanDirs); - if (SelfVolume->VolName) { - SelfPath = StrDuplicate(SelfVolume->VolName); - } else { - SelfPath = AllocateZeroPool(256 * sizeof(CHAR16)); - SPrint(SelfPath, 255, L"fs%d", SelfVolume->VolNumber); - } // if/else + if (SelfVolume) { + if (SelfVolume->VolName) { + SelfPath = StrDuplicate(SelfVolume->VolName); + } else { + SelfPath = AllocateZeroPool(256 * sizeof(CHAR16)); + if (SelfPath != NULL) + SPrint(SelfPath, 255, L"fs%d", SelfVolume->VolNumber); + } // if/else + } MergeStrings(&SelfPath, SelfDirPath, L':'); GlobalConfig.DontScanDirs = SelfPath; MyFreePool(GlobalConfig.DontScanFiles);