summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNicolai Haehnle <[email protected]>2008-07-27 21:40:17 +0200
committerNicolai Haehnle <[email protected]>2008-07-27 21:40:17 +0200
commitc1fb448ce8dd98f8e5fd5a39707f96cc14535bd4 (patch)
treebb1bcc581f6a16944524d1ba10a0a490333883b9 /src
parentc117d0efd28887069607f405be99fbc09fcb4cab (diff)
r300: Fix a crash related to depth textures (triggered by Glest w/ shadowmaps)
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/r300/r300_tex.c2
1 files changed, 2 insertions, 0 deletions
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);