default to empty description if symbol unavailable

develop
Jeremy Apthorp 2019-12-14 12:01:13 -08:00 committed by GitHub
parent 50e696acf6
commit 7644dde9e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

@ -546,8 +546,10 @@ void df_unit_physical_description(df::unit* unit, string* out_str)
static auto* const fn =
reinterpret_cast<void(THISCALL *)(df::unit*, string*)>(
Core::getInstance().vinfo->getAddress("unit_physical_description"));
CHECK_NULL_POINTER(fn);
if (fn)
fn(unit, out_str);
else
*out_str = "";
}
string Units::getPhysicalDescription(df::unit* unit)