Skip to content

Commit

Permalink
backend: gl: handle blur context creation failure
Browse files Browse the repository at this point in the history
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
  • Loading branch information
yshui committed Nov 17, 2022
1 parent e61b3ea commit 706acb7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/backend/gl/gl_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -1182,6 +1182,11 @@ struct backend_shadow_context *gl_create_shadow_context(backend_t *base, double
.deviation = gaussian_kernel_std_for_size(radius, 0.5 / 256.0),
};
ctx->blur_context = gl_create_blur_context(base, BLUR_METHOD_GAUSSIAN, &args);
if (!ctx->blur_context) {
log_error("Failed to create shadow context");
free(ctx);
return NULL;
}
}
return (struct backend_shadow_context *)ctx;
}
Expand Down

0 comments on commit 706acb7

Please sign in to comment.