strb->texture,
0, 0, 0,
surface_usage );
-
- assert(strb->surface->texture);
- assert(strb->surface->format);
- assert(strb->surface->width == width);
- assert(strb->surface->height == height);
-
+ if (strb->surface) {
+ assert(strb->surface->texture);
+ assert(strb->surface->format);
+ assert(strb->surface->width == width);
+ assert(strb->surface->height == height);
+ }
return strb->surface != NULL;
}
default:
_mesa_problem(NULL,
"Unexpected format in st_new_renderbuffer_fb");
+ _mesa_free(strb);
return NULL;
}