diff --git a/MdeModulePkg/Library/DeviceManagerUiLib/DeviceManager.c b/MdeModulePkg/Library/DeviceManagerUiLib/DeviceManager.c
index 5098b70e97..23ae6c5392 100644
--- a/MdeModulePkg/Library/DeviceManagerUiLib/DeviceManager.c
+++ b/MdeModulePkg/Library/DeviceManagerUiLib/DeviceManager.c
@@ -540,12 +540,15 @@ CreateDeviceManagerForm(
// Update the network device form titile.
//
if (NextShowFormId == NETWORK_DEVICE_FORM_ID) {
- String = HiiGetString (HiiHandle, STRING_TOKEN (STR_FORM_NETWORK_DEVICE_TITLE), NULL);
- NewStringLen = StrLen(mSelectedMacAddrString) * 2;
- NewStringLen += (StrLen(String) + 2) * 2;
+ String = HiiGetString (HiiHandle, STRING_TOKEN (STR_FORM_NETWORK_DEVICE_TITLE_HEAD), NULL);
+ if (String == NULL) {
+ return;
+ }
+ NewStringLen = StrLen (mSelectedMacAddrString) * 2;
+ NewStringLen += (StrLen (String) + 2) * 2;
NewStringTitle = AllocatePool (NewStringLen);
UnicodeSPrint (NewStringTitle, NewStringLen, L"%s %s", String, mSelectedMacAddrString);
- HiiSetString (HiiHandle, STRING_TOKEN (STR_FORM_NETWORK_DEVICE_TITLE), NewStringTitle, NULL);
+ HiiSetString (HiiHandle, STRING_TOKEN (STR_FORM_NETWORK_DEVICE_TITLE), NewStringTitle, NULL);
FreePool (String);
FreePool (NewStringTitle);
}
diff --git a/MdeModulePkg/Library/DeviceManagerUiLib/DeviceManagerStrings.uni b/MdeModulePkg/Library/DeviceManagerUiLib/DeviceManagerStrings.uni
index 061e4be434..55d03d6239 100644
--- a/MdeModulePkg/Library/DeviceManagerUiLib/DeviceManagerStrings.uni
+++ b/MdeModulePkg/Library/DeviceManagerUiLib/DeviceManagerStrings.uni
@@ -2,7 +2,7 @@
//
// String definitions for the Device Manager.
//
-// Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.
+// Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.
// This program and the accompanying materials
// are licensed and made available under the terms and conditions of the BSD License
// which accompanies this distribution. The full text of the license may be found at
@@ -42,7 +42,8 @@
#language fr-FR ""
#string STR_EXIT_STRING #language en-US "Press ESC to exit."
#language fr-FR "Press ESC to exit."
-#string STR_FORM_NETWORK_DEVICE_TITLE #language en-US "Network Device"
+#string STR_FORM_NETWORK_DEVICE_TITLE_HEAD #language en-US "Network Device"
+#string STR_FORM_NETWORK_DEVICE_TITLE #language en-US "Network Device"
#language fr-FR "Network Device"
#string STR_FORM_NETWORK_DEVICE_HELP #language en-US "Network Device Help..."
#language fr-FR "Network Device Help..."