From: Maciej Cencora Date: Wed, 2 Dec 2009 22:03:51 +0000 (+0100) Subject: radeon: properly check if image should be placed in the miptree X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8cde43eb19c4dcceb74166e1da123d316a429c21;p=mesa.git radeon: properly check if image should be placed in the miptree Fixes #25355 --- diff --git a/src/mesa/drivers/dri/radeon/radeon_texture.c b/src/mesa/drivers/dri/radeon/radeon_texture.c index 0390d376ba2..00e0658dc54 100644 --- a/src/mesa/drivers/dri/radeon/radeon_texture.c +++ b/src/mesa/drivers/dri/radeon/radeon_texture.c @@ -515,7 +515,10 @@ static int image_matches_texture_obj(struct gl_texture_object *texObj, struct gl_texture_image *texImage, unsigned level) { - const struct gl_texture_image *baseImage = texObj->Image[0][level]; + const struct gl_texture_image *baseImage = texObj->Image[0][texObj->BaseLevel]; + + if (!baseImage) + return 0; if (level < texObj->BaseLevel || level > texObj->MaxLevel) return 0;