gzz-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gzz-commits] gzz/gzz/view TextCellContentView.java


From: Matti Katila
Subject: [Gzz-commits] gzz/gzz/view TextCellContentView.java
Date: Wed, 27 Nov 2002 04:34:45 -0500

CVSROOT:        /cvsroot/gzz
Module name:    gzz
Changes by:     Matti Katila <address@hidden>   02/11/27 04:34:45

Modified files:
        gzz/view       : TextCellContentView.java 

Log message:
        Fixed null-pointer exception.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/view/TextCellContentView.java.diff?tr1=1.31&tr2=1.32&r1=text&r2=text

Patches:
Index: gzz/gzz/view/TextCellContentView.java
diff -u gzz/gzz/view/TextCellContentView.java:1.31 
gzz/gzz/view/TextCellContentView.java:1.32
--- gzz/gzz/view/TextCellContentView.java:1.31  Mon Nov 25 19:56:08 2002
+++ gzz/gzz/view/TextCellContentView.java       Wed Nov 27 04:34:45 2002
@@ -39,7 +39,7 @@
  */
 
 public class TextCellContentView extends CellContentView {
-public static final String rcsid = "$Id: TextCellContentView.java,v 1.31 
2002/11/26 00:56:08 benja Exp $";
+public static final String rcsid = "$Id: TextCellContentView.java,v 1.32 
2002/11/27 09:34:45 mudyc Exp $";
     public static boolean dbg = false;
     private static void pa(String s) { System.err.println(s); }
 
@@ -98,7 +98,12 @@
        vs.coords.getSqSize(box, boxwh);
         float middle = boxwh[0] / 2.0f;
 
-       float y0 = vs.coords.transformPoint(box, 0, 0, point).y;
+
+       // Made null-pointer exception in Pp when tried to animate towards 
empty scene
+       java.awt.Point tmp_point = vs.coords.transformPoint(box, 0, 0, point);
+       if (tmp_point == null) return;
+       //float y0 = vs.coords.transformPoint(box, 0, 0, point).y;
+       float y0 = tmp_point.y;
        float y1 = vs.coords.transformPoint(box, 0, boxwh[1], point).y;
 
        float h = y1-y0;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]