Lillians last patch caused an NPE with Graphics2D enabled. The reason is
that Graphics.setFont should actually accept null fonts without
complaining and siomply leave the current font setting unchanged. I fixed
this.

2005-09-23  Roman Kennke  <[EMAIL PROTECTED]>

        * gnu/java/awt/peer/gtk/GdkGraphics2D.java
        (setFont): If font == null, simply return. Avoids a NPE.

/Roman
Index: gnu/java/awt/peer/gtk/GdkGraphics2D.java
===================================================================
RCS file: /cvsroot/classpath/classpath/gnu/java/awt/peer/gtk/GdkGraphics2D.java,v
retrieving revision 1.48
diff -u -r1.48 GdkGraphics2D.java
--- gnu/java/awt/peer/gtk/GdkGraphics2D.java	10 Sep 2005 05:04:31 -0000	1.48
+++ gnu/java/awt/peer/gtk/GdkGraphics2D.java	23 Sep 2005 21:34:20 -0000
@@ -1624,6 +1624,9 @@
 
   public void setFont(Font f)
   {
+    if (f == null)
+      return;
+
     if (f.getPeer() instanceof GdkFontPeer)
       font = f;
     else
_______________________________________________
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches

Reply via email to