- Fix RVCT warning: 'SecondEntry' may be uninitialised.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Harry Liebel <Harry.Liebel@arm.com>
Reviewed-By: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15904
6f19259b-4bc3-4df7-8a09-
765794883524
}\r
\r
SelectedEntry = &BootOptionEntry->Link;\r
}\r
\r
SelectedEntry = &BootOptionEntry->Link;\r
// Note down the previous entry in the list to be able to cancel changes\r
PrevEntry = GetPreviousNode (BootOptionsList, SelectedEntry);\r
\r
// Note down the previous entry in the list to be able to cancel changes\r
PrevEntry = GetPreviousNode (BootOptionsList, SelectedEntry);\r
\r
} while ((!Move) && (!Save) && (!Cancel));\r
\r
if (Move) {\r
} while ((!Move) && (!Save) && (!Cancel));\r
\r
if (Move) {\r
- SwapListEntries (SelectedEntry, SecondEntry);\r
+ if ((SelectedEntry != NULL) && (SecondEntry != NULL)) {\r
+ SwapListEntries (SelectedEntry, SecondEntry);\r
+ }\r
} else {\r
if (Save) {\r
Status = GetGlobalEnvironmentVariable (\r
} else {\r
if (Save) {\r
Status = GetGlobalEnvironmentVariable (\r