]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Console/TerminalDxe/Terminal.c
Add ASSERT to check if NewVariable is NULL.
[mirror_edk2.git] / MdeModulePkg / Universal / Console / TerminalDxe / Terminal.c
index 511094844b0503ea70e380610d89f43519c90463..966fb79ce4b3f1643a71a57b4938391501f5cecf 100644 (file)
@@ -1444,6 +1444,7 @@ TerminalUpdateConsoleDevVariable (
   for (TerminalType = PCANSITYPE; TerminalType <= VTUTF8TYPE; TerminalType++) {\r
     SetTerminalDevicePath (TerminalType, ParentDevicePath, &TempDevicePath);\r
     NewVariable = AppendDevicePathInstance (Variable, TempDevicePath);\r
+    ASSERT (NewVariable != NULL);\r
     if (Variable != NULL) {\r
       FreePool (Variable);\r
     }\r