src/share/classes/sun/java2d/pisces/Renderer.java

Print this page
rev 1697 : [mq]: piscesnpe.patch

@@ -773,14 +773,16 @@
         crossingsSorted = false;
     }
 
     // Free sorting arrays if larger than maximum size
     private void crossingListFinished() {
-        if (crossings.length > DEFAULT_CROSSINGS_SIZE) {
+        if (crossings != null && crossings.length > DEFAULT_CROSSINGS_SIZE) {
             crossings = new int[DEFAULT_CROSSINGS_SIZE];
         }
-        if (crossingIndices.length > DEFAULT_INDICES_SIZE) {
+        if (crossingIndices != null
+                && crossingIndices.length > DEFAULT_INDICES_SIZE)
+        {
             crossingIndices = new int[DEFAULT_INDICES_SIZE];
         }
     }
 
     private void sortCrossings(int[] x, int off, int len) {