https://bugzilla.tianocore.org/show_bug.cgi?id=1920
Check ConfigAccess available before call callback function.
Signed-off-by: GregX Yeh <gregx.yeh@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Ted Kuo <ted.kuo@intel.com>
---
MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c b/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c
index d7927725b2..a613ab350c 100644
--- a/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c
+++ b/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c
@@ -1958,6 +1958,23 @@ ProcessCallBackFunction (
if (ConfigAccess == NULL) {
return EFI_SUCCESS;
}
+//
+// Check ConfigAccess available.
+//
+ Status = gBS->HandleProtocol (
+ FormSet->DriverHandle,
+ &gEfiHiiConfigAccessProtocolGuid,
+ (VOID **) &FormSet->ConfigAccess
+ );
+ if (EFI_ERROR (Status)) {
+ //
+ // Configuration Driver don't attach ConfigAccess protocol to its HII package
+ // list, then there will be no configuration action required.
+ // Or the ConfigAccess protocol has been uninstalled.
+ //
+ FormSet->ConfigAccess = NULL;
+ return EFI_SUCCESS;
+ }
Link = GetFirstNode (&Form->StatementListHead);
while (!IsNull (&Form->StatementListHead, Link)) {
--
2.16.2.windows.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#42555): https://edk2.groups.io/g/devel/message/42555
Mute This Topic: https://groups.io/mt/32110310/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-