aperture-tiles
aperture-tiles copied to clipboard
Null Pointer Exception with empty overlay
In JsonUntilities.overlayInPlace line 123:
for (String key: JSONObject.getNames(overlay)) { .. }
If the overlay is an empty object ( i.e. {} ) getNames returns null and a Null Pointer exception is thrown.
Can be fixed with a simple null check, but I am not 100% sure that there isn't something wrong with my standard tiling job set up that is the true root cause of this error.
fix:
String[] names = JSONObject.getNames(overlay);
if (names != null){
for (String key: JSONObject.getNames(overlay)) {...}
..}