From: Nicolai Haehnle Date: Sun, 27 Jul 2008 19:40:17 +0000 (+0200) Subject: r300: Fix a crash related to depth textures (triggered by Glest w/ shadowmaps) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c1fb448ce8dd98f8e5fd5a39707f96cc14535bd4;p=mesa.git r300: Fix a crash related to depth textures (triggered by Glest w/ shadowmaps) --- diff --git a/src/mesa/drivers/dri/r300/r300_tex.c b/src/mesa/drivers/dri/r300/r300_tex.c index c8f02c4ef5b..f7f49729bc8 100644 --- a/src/mesa/drivers/dri/r300/r300_tex.c +++ b/src/mesa/drivers/dri/r300/r300_tex.c @@ -944,6 +944,8 @@ static void r300TexParameter(GLcontext * ctx, GLenum target, break; case GL_DEPTH_TEXTURE_MODE: + if (!texObj->Image[0][texObj->BaseLevel]) + return; if (texObj->Image[0][texObj->BaseLevel]->TexFormat->BaseFormat == GL_DEPTH_COMPONENT) { r300SetDepthTexMode(texObj);