diff options
Diffstat (limited to 'MdeModulePkg/Application/CapsuleApp/CapsuleOnDisk.c')
-rw-r--r-- | MdeModulePkg/Application/CapsuleApp/CapsuleOnDisk.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/MdeModulePkg/Application/CapsuleApp/CapsuleOnDisk.c b/MdeModulePkg/Application/CapsuleApp/CapsuleOnDisk.c index 4faa863bca..f6e46cbdb1 100644 --- a/MdeModulePkg/Application/CapsuleApp/CapsuleOnDisk.c +++ b/MdeModulePkg/Application/CapsuleApp/CapsuleOnDisk.c @@ -445,7 +445,10 @@ GetUpdateFileSystem ( (VOID **)&BootNextData,
NULL
);
- if (!EFI_ERROR (Status)) {
+ if (EFI_ERROR (Status) || BootNextData == NULL) {
+ Print (L"Get Boot Next Data Fail. Status = %r\n", Status);
+ return EFI_NOT_FOUND;
+ } else {
UnicodeSPrint (BootOptionName, sizeof (BootOptionName), L"Boot%04x", *BootNextData);
Status = EfiBootManagerVariableToLoadOption (BootOptionName, &BootNextOption);
if (!EFI_ERROR (Status)) {
|