OSDN Git Service

[updated] NinePatch, added a tint color, copy ctor.
[mikumikustudio/libgdx-mikumikustudio.git] / gdx / src / com / badlogic / gdx / graphics / g2d / TextureRegion.java
index a25e5c0..401dc31 100644 (file)
@@ -33,6 +33,7 @@ public class TextureRegion {
 \r
        /** Constructs a region the size of the specified texture. */\r
        public TextureRegion (Texture texture) {\r
+               if (texture == null) throw new IllegalArgumentException("texture cannot be null.");\r
                this.texture = texture;\r
                setRegion(0, 0, texture.getWidth(), texture.getHeight());\r
        }\r