public void render(Graphics2D g) {
Rectangle2D drawBounds = bounds;
if(drawBounds == null) {
- drawBounds = (Rectangle2D)g.getClipBounds().clone(); // Fill whole clip area if bounds is not defined
+ if (g.getClipBounds() != null)
+ drawBounds = (Rectangle2D)g.getClipBounds().clone(); // Fill whole clip area if bounds is not defined
+ else
+ return;
}
if (color!=null) {