summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorEric Engestrom <[email protected]>2018-06-18 11:39:05 +0100
committerEric Engestrom <[email protected]>2018-06-18 16:19:48 +0100
commit9a4bd6b45f909dbf65cf66086be2492214c5ac93 (patch)
tree42f76fdfe0a641c0adf7874f47b9cbf0df03564a /src/mesa
parenta3d93eec7cbd3fb733c1ef3b16903265e8e61b23 (diff)
mesa: add missing return in error path
Fixes: 67f40dadaa6666dacd90 "mesa: add support for ARB_sample_locations" Cc: Rhys Perry <[email protected]> Cc: Brian Paul <[email protected]> Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/fbobject.c4
1 files changed, 3 insertions, 1 deletions
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;
}