From 310b075bd8e557cdf8ae07a44770d4bcba5772c0 Mon Sep 17 00:00:00 2001 From: Fernando Nasser Date: Wed, 17 Dec 2003 17:20:00 +0000 Subject: [PATCH] GtkContainerPeer.java (handleEvent): Check for null Graphics pointer returned by FileDialogPeer. 2003-12-16 Fernando Nasser * gnu/java/awt/peer/gtk/GtkContainerPeer.java (handleEvent): Check for null Graphics pointer returned by FileDialogPeer. From-SVN: r74744 --- libjava/ChangeLog | 5 +++++ libjava/gnu/java/awt/peer/gtk/GtkContainerPeer.java | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 35ee612260e..32e44100a56 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,8 @@ +2003-12-16 Fernando Nasser + + * gnu/java/awt/peer/gtk/GtkContainerPeer.java (handleEvent): Check for + null Graphics pointer returned by FileDialogPeer. + 2003-12-17 Michael Koch * libltdl/stamp-h.in: Removed, not used anymore. diff --git a/libjava/gnu/java/awt/peer/gtk/GtkContainerPeer.java b/libjava/gnu/java/awt/peer/gtk/GtkContainerPeer.java index 5225ccc5f14..8ab37341917 100644 --- a/libjava/gnu/java/awt/peer/gtk/GtkContainerPeer.java +++ b/libjava/gnu/java/awt/peer/gtk/GtkContainerPeer.java @@ -107,6 +107,11 @@ public class GtkContainerPeer extends GtkComponentPeer try { Graphics g = getGraphics (); + + // Some peers like GtkFileDialogPeer are repainted by Gtk itself + if (g == null) + break; + g.setClip (((PaintEvent)event).getUpdateRect()); if (id == PaintEvent.PAINT)