r200: fix texture level for compiz case
authorJerome Glisse <glisse@freedesktop.org>
Sun, 12 Apr 2009 13:51:31 +0000 (15:51 +0200)
committerJerome Glisse <glisse@freedesktop.org>
Sun, 12 Apr 2009 13:51:31 +0000 (15:51 +0200)
src/mesa/drivers/dri/r200/r200_texstate.c

index 9797f77ec4f2bf40230b0d499c1b5ad44e5f072d..15758d767cf2866d6d098e596cee3c303dfe98dc 100644 (file)
@@ -1422,8 +1422,8 @@ void set_re_cntl_d3d( GLcontext *ctx, int unit, GLboolean use_d3d )
  */
 static void setup_hardware_state(r200ContextPtr rmesa, radeonTexObj *t)
 {
-   const struct gl_texture_image *firstImage =
-      t->base.Image[0][t->mt->firstLevel];
+   int firstlevel = t->mt ? t->mt->firstLevel : 0;
+   const struct gl_texture_image *firstImage = t->base.Image[0][firstlevel];
    GLint log2Width, log2Height, log2Depth, texelBytes;
    
    if ( t->bo ) {