diff --git a/EdkModulePkg/Universal/EmuVariable/RuntimeDxe/EmuVariable.c b/EdkModulePkg/Universal/EmuVariable/RuntimeDxe/EmuVariable.c index 6614bb03e9..fe1ac92b63 100644 --- a/EdkModulePkg/Universal/EmuVariable/RuntimeDxe/EmuVariable.c +++ b/EdkModulePkg/Universal/EmuVariable/RuntimeDxe/EmuVariable.c @@ -413,7 +413,7 @@ Returns: UINTN VarNameSize; EFI_STATUS Status; - if (VariableNameSize == NULL || VendorGuid == NULL) { + if (VariableNameSize == NULL || VariableName == NULL || VendorGuid == NULL) { return EFI_INVALID_PARAMETER; }