check return value of invert_matrix()
authorJonathan Bestien-Filiatrault <joe@x2a.org>
Wed, 12 Sep 2007 22:21:13 +0000 (16:21 -0600)
committerBrian <brian.paul@tungstengraphics.com>
Wed, 12 Sep 2007 22:21:13 +0000 (16:21 -0600)
src/glu/mesa/Makefile
src/glu/mesa/project.c
src/glu/mini/project.c

index 47f95ef..611d7a6 100644 (file)
@@ -23,7 +23,7 @@ C_SOURCES = \
 
 OBJECTS = $(C_SOURCES:.c=.o)
 
-INCLUDES = -I. -I- -I$(TOP)/include
+INCLUDES = -I. -I$(TOP)/include
 
 ##### RULES #####
 
index 6fa0326..2e79cdf 100644 (file)
@@ -346,7 +346,8 @@ gluUnProject(GLdouble winx, GLdouble winy, GLdouble winz,
 
    /* calcul transformation inverse */
    matmul(A, proj, model);
-   invert_matrix(A, m);
+   if (!invert_matrix(A, m))
+      return GL_FALSE;
 
    /* d'ou les coordonnees objets */
    transform_point(out, m, in);
@@ -386,7 +387,8 @@ gluUnProject4(GLdouble winx, GLdouble winy, GLdouble winz, GLdouble clipw,
 
    /* calcul transformation inverse */
    matmul(A, projMatrix, modelMatrix);
-   invert_matrix(A, m);
+   if (!invert_matrix(A, m))
+      return GL_FALSE;
 
    /* d'ou les coordonnees objets */
    transform_point(out, m, in);
index a2747de..7127994 100644 (file)
@@ -347,7 +347,8 @@ gluUnProject(GLdouble winx, GLdouble winy, GLdouble winz,
 
    /* calcul transformation inverse */
    matmul(A, proj, model);
-   invert_matrix(A, m);
+   if (!invert_matrix(A, m))
+      return GL_FALSE;
 
    /* d'ou les coordonnees objets */
    transform_point(out, m, in);
@@ -387,7 +388,8 @@ gluUnProject4(GLdouble winx, GLdouble winy, GLdouble winz, GLdouble clipw,
 
    /* calcul transformation inverse */
    matmul(A, projMatrix, modelMatrix);
-   invert_matrix(A, m);
+   if (!invert_matrix(A, m))
+      return GL_FALSE;
 
    /* d'ou les coordonnees objets */
    transform_point(out, m, in);