Don't NPE when we have a missing color class in the list, instead, return -1 to emulate the old IntIntMap behavior.

git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@926 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
Mike Thomas
2010-06-11 18:00:09 +00:00
parent 2e3d310f7f
commit 1f9cf2beca
@@ -53,7 +53,10 @@ public class StageSceneModel extends SceneModel
public int getDefaultColor (int classId)
{
if (defaultColors != null) {
return defaultColors.get(classId);
Integer result = defaultColors.get(classId);
if (result != null) {
return result;
}
}
return -1;
}