This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[gui] [PATCH] Fix setFont in GtkContainerPeer


Hi,

I committed the following small patch to the java-gui-branch.  It fixes
a small bug in GtkContainerPeer.setFont().

-David Jee

2004-03-04  David Jee  <djee@redhat.com>

        * gnu/java/awt/peer/gtk/GtkContainerPeer.java
        (setFont): Check if child peers are null.


Index: gnu/java/awt/peer/gtk/GtkContainerPeer.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/gnu/java/awt/peer/gtk/GtkContainerPeer.java,v
retrieving revision 1.8.2.1
diff -u -r1.8.2.1 GtkContainerPeer.java
--- gnu/java/awt/peer/gtk/GtkContainerPeer.java	27 Feb 2004 19:43:40 -0000	1.8.2.1
+++ gnu/java/awt/peer/gtk/GtkContainerPeer.java	4 Mar 2004 20:16:46 -0000
@@ -100,7 +100,7 @@
     for (int i = 0; i < components.length; i++)
       {
         GtkComponentPeer peer = (GtkComponentPeer) components[i].getPeer();
-        if (! peer.awtComponent.isFontSet())
+        if (peer != null && ! peer.awtComponent.isFontSet())
           peer.setFont(f);
       }
   }

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]