\r
#include "LegacyBootMaintUi.h"\r
\r
-LEGACY_BOOT_OPTION_CALLBACK_DATA *mLegacyBootOptionPrivate;\r
+LEGACY_BOOT_OPTION_CALLBACK_DATA *mLegacyBootOptionPrivate = NULL;\r
EFI_GUID mLegacyBootOptionGuid = LEGACY_BOOT_OPTION_FORMSET_GUID;\r
CHAR16 mLegacyBootStorageName[] = L"LegacyBootData";\r
BBS_TYPE mBbsType[] = {BBS_FLOPPY, BBS_HARDDISK, BBS_CDROM, BBS_EMBED_NETWORK, BBS_BEV_DEVICE, BBS_UNKNOWN};\r
{\r
EFI_STATUS Status;\r
\r
- if (mLegacyBootOptionPrivate->DriverHandle != NULL) {\r
+ if (mLegacyBootOptionPrivate != NULL && mLegacyBootOptionPrivate->DriverHandle != NULL) {\r
Status = gBS->UninstallMultipleProtocolInterfaces (\r
mLegacyBootOptionPrivate->DriverHandle,\r
&gEfiDevicePathProtocolGuid,\r