diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-08-27 04:22:31 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-08-27 04:22:31 +0300 |
commit | 2ff7ba2c6ce3af5eed22d5394d1098a3974f268b (patch) | |
tree | 34d574b706473aec93de4eee6f8759813a3cc07b /source/blender/gpu/intern/gpu_matrix.c | |
parent | 79111f92463c05f05d3765bff2b3c15b56df0731 (diff) |
Correct matrix stack assert
Diffstat (limited to 'source/blender/gpu/intern/gpu_matrix.c')
-rw-r--r-- | source/blender/gpu/intern/gpu_matrix.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/gpu/intern/gpu_matrix.c b/source/blender/gpu/intern/gpu_matrix.c index 38a55020a5e..11575d8062c 100644 --- a/source/blender/gpu/intern/gpu_matrix.c +++ b/source/blender/gpu/intern/gpu_matrix.c @@ -121,7 +121,7 @@ static void checkmat(cosnt float *m) void gpuPushMatrix(void) { - BLI_assert(ModelViewStack.top < MATRIX_STACK_DEPTH); + BLI_assert(ModelViewStack.top + 1 < MATRIX_STACK_DEPTH); ModelViewStack.top++; copy_m4_m4(ModelView, ModelViewStack.stack[ModelViewStack.top - 1]); } @@ -135,7 +135,7 @@ void gpuPopMatrix(void) void gpuPushProjectionMatrix(void) { - BLI_assert(ProjectionStack.top < MATRIX_STACK_DEPTH); + BLI_assert(ProjectionStack.top + 1 < MATRIX_STACK_DEPTH); ProjectionStack.top++; copy_m4_m4(Projection, ProjectionStack.stack[ProjectionStack.top - 1]); } |