Fixed null pointer when iff doesn't load correctly

This commit is contained in:
Obique PSWG
2016-05-13 15:39:12 -05:00
parent dbb1af12b3
commit 5caf538ffb
+3 -1
View File
@@ -196,7 +196,9 @@ public final class ObjectCreator {
private static void handlePostCreation(SWGObject object, ObjectData attributes) {
addObjectAttributes(object, attributes);
createObjectSlots(object);
object.setGameObjectType(GameObjectType.getTypeFromId((Integer) object.getDataAttribute(ObjectDataAttribute.GAME_OBJECT_TYPE)));
Object got = object.getDataAttribute(ObjectDataAttribute.GAME_OBJECT_TYPE);
if (got != null)
object.setGameObjectType(GameObjectType.getTypeFromId((Integer) got));
}
private static void addObjectAttributes(SWGObject obj, ObjectData attributes) {