This commit is contained in:
Yorick
2015-04-07 13:13:00 +02:00
+6 -2
View File
@@ -172,8 +172,12 @@ public abstract class DrawObject implements Serializable
{
Shape ownShape = getRectangle();
Rectangle2D otherRectangle = object.getTransform().createTransformedShape(object.getImageRectangle()).getBounds2D();
if (ownShape.intersects(otherRectangle))
return true;
if(ownShape != null && otherRectangle != null) {
if (ownShape.intersects(otherRectangle))
return true;
else
return false;
}
else
return false;
}