Merge commit 'origin/master' into gallium-0.2
[mesa.git] / src / glu / mesa / project.c
index c8ab95992af0bdd0746e6380fc7b11d9e55d5895..2e79cdf0840477d24c87a886e9184cba34243803 100644 (file)
@@ -1,4 +1,3 @@
-/* $Id: project.c,v 1.3 2000/07/11 14:11:04 brianp Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -347,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);
@@ -387,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);