X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fmain%2Ffbobject.c;h=fa7a9361dfcfeaa105aa40ec56397fd7438bd05a;hb=9a4bd6b45f909dbf65cf66086be2492214c5ac93;hp=5d7e5d29847dcfdbb23ea9dfc0f88fe579fc603b;hpb=a3d93eec7cbd3fb733c1ef3b16903265e8e61b23;p=mesa.git diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index 5d7e5d29847..fa7a9361dfc 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -4695,9 +4695,11 @@ sample_locations(struct gl_context *ctx, struct gl_framebuffer *fb, if (!fb->SampleLocationTable) { size_t size = MAX_SAMPLE_LOCATION_TABLE_SIZE * 2 * sizeof(GLfloat); fb->SampleLocationTable = malloc(size); - if (!fb->SampleLocationTable) + if (!fb->SampleLocationTable) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "Cannot allocate sample location table"); + return; + } for (i = 0; i < MAX_SAMPLE_LOCATION_TABLE_SIZE * 2; i++) fb->SampleLocationTable[i] = 0.5f; }