When StringId is not 0, String returned from GetSmbiosStringById is expected to non-NULL.
Add ASSERT (String != NULL); to ensure this.
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Shumin Qiu <shumin.qiu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Shumin Qiu <shumin.qiu@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18713
6f19259b-4bc3-4df7-8a09-
765794883524
if (StringId != 0) {\r
// set ' ' for string field\r
String = GetSmbiosStringById (TableEntry, StringId, &StringLen);\r
+ ASSERT (String != NULL);\r
//DEBUG ((EFI_D_INFO,"StrId(0x%x)-%a(%d)\n", StringId, String, StringLen));\r
SetMem (String, StringLen, ' ');\r
}\r