harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aiva...@apache.org
Subject svn commit: r577619 - /harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/BlockView.java
Date Thu, 20 Sep 2007 08:19:56 GMT
Author: aivanov
Date: Thu Sep 20 01:19:55 2007
New Revision: 577619

URL: http://svn.apache.org/viewvc?rev=577619&view=rev
Log:
Applying patch for HARMONY-4755: JEditorPane.setPage() throws NPE

Modified:
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/BlockView.java

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/BlockView.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/BlockView.java?rev=577619&r1=577618&r2=577619&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/BlockView.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/BlockView.java
Thu Sep 20 01:19:55 2007
@@ -74,7 +74,12 @@
 
     public void paint(final Graphics g, final Shape allocation) {
         Rectangle rc = allocation.getBounds();
-        boxPainter.paint(g, rc.x, rc.y, rc.width, rc.height, this);
+
+        // Fix for HARMONY-4755, boxPainter is only initialized
+        // after setPropertiesFromAttributes() is called.
+        if (boxPainter != null) {
+            boxPainter.paint(g, rc.x, rc.y, rc.width, rc.height, this);
+        }
         super.paint(g, allocation);
     }
 



Mime
View raw message