backend: gl: handle blur context creation failure

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui
2022-11-17 22:16:27 +00:00
committed by Arda Atci
parent 8f848c2b1d
commit 611f8b80c2

View File

@@ -1188,6 +1188,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;
}