--- Mesa-7.0.1/src/mesa/drivers/dri/r200/r200_tex.c 2007-08-02 00:50:00.000000000 +0300 +++ Mesa-7.0.1-patched/src/mesa/drivers/dri/r200/r200_tex.c 2007-08-27 23:09:32.881002192 +0300 @@ -1161,7 +1161,10 @@ if (!obj) return NULL; obj->MaxAnisotropy = rmesa->initialMaxAnisotropy; - r200AllocTexObj( obj ); + if (!r200AllocTexObj( obj )) { + _mesa_delete_texture_object(ctx, obj); + return NULL; + } return obj; }