Index: Library/UefiShellDebug1CommandsLib/DmpStore.c
===================================================================
--- Library/UefiShellDebug1CommandsLib/DmpStore.c	(revision 15753)
+++ Library/UefiShellDebug1CommandsLib/DmpStore.c	(working copy)
@@ -641,6 +641,9 @@
       ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_CONFLICT), gShellDebug1HiiHandle, L"-l or -s", L"-d");
       ShellStatus = SHELL_INVALID_PARAMETER;
     } else {
+      //
+      // Determine the GUID to search for based on -all and -guid parameters
+      //
       if (!ShellCommandLineGetFlag(Package, L"-all")) {
         GuidStr = ShellCommandLineGetValue(Package, L"-guid");
         if (GuidStr != NULL) {
@@ -653,11 +656,15 @@
         } else  {
           Guid = &gEfiGlobalVariableGuid;
         }
-        Name = ShellCommandLineGetRawValue(Package, 1);
       } else {
-        Name  = NULL;
         Guid  = NULL;
       }
+
+      //
+      // Get the Name of the variable to find
+      //
+      Name = ShellCommandLineGetRawValue(Package, 1);
+
       if (ShellStatus == SHELL_SUCCESS) {
         if (ShellCommandLineGetFlag(Package, L"-s")) {
           Type = DmpStoreSave;
