dri/nouveau: Don't try to validate uninitialized teximages.

This commit is contained in:
Francisco Jerez 2010-08-04 16:38:57 +02:00
parent d03f04bfb5
commit bc578caefb

View file

@ -183,10 +183,10 @@ teximage_fits(struct gl_texture_object *t, int level)
struct nouveau_surface *s = &to_nouveau_texture(t)->surfaces[level];
struct gl_texture_image *ti = t->Image[0][level];
return ti && (t->Target == GL_TEXTURE_RECTANGLE ||
(s->bo && s->width == ti->Width &&
s->height == ti->Height &&
s->format == ti->TexFormat));
return ti && to_nouveau_teximage(ti)->surface.bo &&
(t->Target == GL_TEXTURE_RECTANGLE ||
(s->bo && s->format == ti->TexFormat &&
s->width == ti->Width && s->height == ti->Height));
}
static GLboolean