diff options
Diffstat (limited to 'gnu/java/awt/peer/gtk/GtkImage.java')
-rw-r--r-- | gnu/java/awt/peer/gtk/GtkImage.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gnu/java/awt/peer/gtk/GtkImage.java b/gnu/java/awt/peer/gtk/GtkImage.java index a8cbbe6c1..5e5f1de01 100644 --- a/gnu/java/awt/peer/gtk/GtkImage.java +++ b/gnu/java/awt/peer/gtk/GtkImage.java @@ -583,6 +583,9 @@ public class GtkImage extends Image srcHeight = height - srcY; } + if ( this.width <= 0 || this.height <= 0 ) + return true; + if ( srcWidth <= 0 || srcHeight <= 0 || dstWidth <= 0 || dstHeight <= 0) return true; @@ -616,6 +619,9 @@ public class GtkImage extends Image if (addObserver(observer)) return false; + if ( this.width <= 0 || this.height <= 0 ) + return true; + synchronized(GdkPixbufDecoder.pixbufLock) { if(bgcolor != null) |