mirror of
https://github.com/yshui/picom.git
synced 2024-11-11 13:51:02 -05:00
backend: gl: handle blur context creation failure
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
parent
e61b3ea7a3
commit
706acb78b7
1 changed files with 5 additions and 0 deletions
|
@ -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),
|
.deviation = gaussian_kernel_std_for_size(radius, 0.5 / 256.0),
|
||||||
};
|
};
|
||||||
ctx->blur_context = gl_create_blur_context(base, BLUR_METHOD_GAUSSIAN, &args);
|
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;
|
return (struct backend_shadow_context *)ctx;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue