diff --git a/libretro-common/gfx/math/matrix_4x4.c b/libretro-common/gfx/math/matrix_4x4.c index 091b3af2a7..e3c022cd0d 100644 --- a/libretro-common/gfx/math/matrix_4x4.c +++ b/libretro-common/gfx/math/matrix_4x4.c @@ -186,6 +186,9 @@ void matrix_4x4_multiply( unsigned r, c, k; math_matrix_4x4 mat; + if (!out || !a || !b) + return; + for (r = 0; r < 4; r++) { for (c = 0; c < 4; c++)