Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26381/view
Modified Files:
AbstractView.java
Log Message:
removed a null pointer appotunity
Index: AbstractView.java
===================================================================
RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/AbstractView.java,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** AbstractView.java 12 Sep 2005 18:13:02 -0000 1.26
--- AbstractView.java 14 Sep 2005 14:07:37 -0000 1.27
***************
*** 484,489 ****
if (drawMode == LIGHTING_MODE) {
Vertex norm = s.normal();
! norm.scale(1 / norm.length());
! gl.glNormal3d(norm.getX(), norm.getY(), norm.getZ());
}
//drawing the outer contour
--- 484,491 ----
if (drawMode == LIGHTING_MODE) {
Vertex norm = s.normal();
! if (norm != null) {
! norm.scale(1 / norm.length());
! gl.glNormal3d(norm.getX(), norm.getY(), norm.getZ());
! }
}
//drawing the outer contour
|