[BOOTLIB] Remove a useless 'FontDirectory' check as it becomes always valid (!= NULL) through the function.

CORE-11590

Adapted from Victor Martinez patch & Serge Gautherie PR #2062
This commit is contained in:
Hermès Bélusca-Maïto 2019-11-27 01:30:56 +01:00
parent 591b2b807c
commit f986527d49
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0

View file

@ -91,9 +91,9 @@ DsppLoadFontFile (
if (!FontDirectory) if (!FontDirectory)
{ {
/* Use the boot device and boot directory */ /* Use the boot device and boot directory */
CustomDevice = FALSE;
FontDevice = BlpBootDevice; FontDevice = BlpBootDevice;
FontDirectory = L"\\EFI\\Microsoft\\Boot\\Fonts"; FontDirectory = L"\\EFI\\Microsoft\\Boot\\Fonts";
CustomDevice = FALSE;
} }
else else
{ {
@ -157,8 +157,9 @@ Quickie:
} }
/* Check if we had a custom font directory allocated and free it */ /* Check if we had a custom font directory allocated and free it */
if ((FontDirectory) && (CustomDirectory)) if ((CustomDirectory) && (CustomDevice))
{ {
ASSERT(FontDirectory);
BlMmFreeHeap(FontDirectory); BlMmFreeHeap(FontDirectory);
} }