From 5fdeb52e5d21bfb7feff2253c7d9e18e6b3cb252 Mon Sep 17 00:00:00 2001 From: Jonathan Bestien-Filiatrault Date: Wed, 12 Sep 2007 16:21:13 -0600 Subject: [PATCH] check return value of invert_matrix() --- src/glu/mesa/Makefile | 2 +- src/glu/mesa/project.c | 6 ++++-- src/glu/mini/project.c | 6 ++++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/glu/mesa/Makefile b/src/glu/mesa/Makefile index 47f95ef0240..611d7a630c8 100644 --- a/src/glu/mesa/Makefile +++ b/src/glu/mesa/Makefile @@ -23,7 +23,7 @@ C_SOURCES = \ OBJECTS = $(C_SOURCES:.c=.o) -INCLUDES = -I. -I- -I$(TOP)/include +INCLUDES = -I. -I$(TOP)/include ##### RULES ##### diff --git a/src/glu/mesa/project.c b/src/glu/mesa/project.c index 6fa03267e53..2e79cdf0840 100644 --- a/src/glu/mesa/project.c +++ b/src/glu/mesa/project.c @@ -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); diff --git a/src/glu/mini/project.c b/src/glu/mini/project.c index a2747de55f2..71279947cf9 100644 --- a/src/glu/mini/project.c +++ b/src/glu/mini/project.c @@ -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); -- 2.30.2