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:
parent
77dafaece3
commit
a0c5089935
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue