meta: Add assertion check for ctx->Meta->SaveStackDepth
before using it for derefrencing. Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Neil Roberts <neil@linux.intel.com>
This commit is contained in:
@@ -823,6 +823,8 @@ _mesa_meta_begin(struct gl_context *ctx, GLbitfield state)
|
||||
void
|
||||
_mesa_meta_end(struct gl_context *ctx)
|
||||
{
|
||||
assert(ctx->Meta->SaveStackDepth > 0);
|
||||
|
||||
struct save_state *save = &ctx->Meta->Save[ctx->Meta->SaveStackDepth - 1];
|
||||
const GLbitfield state = save->SavedState;
|
||||
int i;
|
||||
|
||||
Reference in New Issue
Block a user