OSDN Git Service

Fix Issue 1286.
authorJustin Shapcott <support@mobidevelop.com>
Tue, 26 Feb 2013 15:04:59 +0000 (08:04 -0700)
committerJustin Shapcott <support@mobidevelop.com>
Tue, 26 Feb 2013 15:04:59 +0000 (08:04 -0700)
Error in check for Ellipse type caused EllipseMapObject in lieu of
RectangleMapObject.

gdx/src/com/badlogic/gdx/maps/tiled/TmxMapLoader.java

index 69594d1..b1f4bee 100644 (file)
@@ -525,7 +525,7 @@ public class TmxMapLoader extends SynchronousAssetLoader<TiledMap, TmxMapLoader.
                                                vertices[i * 2 + 1] = y + Integer.parseInt(point[1]);
                                        }
                                        object = new PolylineMapObject(vertices);
-                               } else if ((child == element.getChildByName("ellipse"))) {
+                               } else if ((child = element.getChildByName("ellipse")) != null) {
                                        object = new EllipseMapObject(x, y, width, height);
                                }
                        }