Fixed null pointer issue occurring on some houses when inspecting for packup.

This commit is contained in:
Cekis
2017-01-24 19:17:45 +00:00
parent e44ef18b8f
commit fdc038e9bd
@@ -2649,6 +2649,10 @@ public class player_structure extends script.base_script
return;
}
String signText = getName(signId);
if(signText == null){
LOG("playerStructure", "WARNING: Structure (" + structure + ") at location [" + getLocation(structure).toString() + "] has a sign (" + signId + "), but the sign name could not be retrieved.");
return;
}
int indexOfAbandonedText = signText.indexOf(player_structure.CITY_ABANDONED_TEXT);
if (indexOfAbandonedText > -1)
{