Revision: 14948
          http://sourceforge.net/p/edk2/code/14948
Author:   ydong10
Date:     2013-12-09 03:21:29 +0000 (Mon, 09 Dec 2013)
Log Message:
-----------
Refine code to fix potential code bug.

Signed-off-by: Eric Dong <[email protected]>
Reviewed-by: Liming Gao <[email protected]>

Modified Paths:
--------------
    trunk/edk2/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c

Modified: trunk/edk2/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c
===================================================================
--- trunk/edk2/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c    
2013-12-09 02:24:39 UTC (rev 14947)
+++ trunk/edk2/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c    
2013-12-09 03:21:29 UTC (rev 14948)
@@ -2548,12 +2548,12 @@
         // If the screen has no menu items, and the user didn't select UiReset
         // ignore the selection and go back to reading keys.
         //
+        ASSERT(MenuOption != NULL);
         if(IsListEmpty (&gMenuOption) || MenuOption->GrayOut || 
MenuOption->ReadOnly) {
           ControlFlag = CfReadKey;
           break;
         }
 
-        ASSERT(MenuOption != NULL);
         Statement = MenuOption->ThisTag;
         if ((Statement->OpCode->OpCode == EFI_IFR_DATE_OP)
           || (Statement->OpCode->OpCode == EFI_IFR_TIME_OP)
@@ -2736,7 +2736,8 @@
 
     case CfUiHotKey:
       ControlFlag = CfRepaint;
-      
+
+      ASSERT (HotKey != NULL);
       gUserInput->Action = HotKey->Action;
       ControlFlag = CfExit;
       break;

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to