mesa/math: Fix address of array always returning true

external/mesa3d/src/mesa/math/m_matrix.c:1403:13: error: address of array 'mat->inv' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
       if (mat->inv && (mat->flags & MAT_DIRTY_INVERSE)) {
           ~~~~~^~~ ~~

Fixes: 3175b63a0d ("mesa: don't allocate matrices with malloc")
Reviewed-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7861>
This commit is contained in:
Marijn Suijten 2020-12-01 19:19:29 +01:00
parent 77dafaece3
commit a0c5089935
1 changed files with 1 additions and 1 deletions

View File

@ -1400,7 +1400,7 @@ _math_matrix_analyse( GLmatrix *mat )
analyse_from_flags( mat );
}
if (mat->inv && (mat->flags & MAT_DIRTY_INVERSE)) {
if (mat->flags & MAT_DIRTY_INVERSE) {
matrix_invert( mat );
mat->flags &= ~MAT_DIRTY_INVERSE;
}