new backends: don't destroy blur context when there's none

Fixes #190

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui 2019-06-13 08:14:14 +01:00
parent 76e574dc94
commit 863e2c82ec
No known key found for this signature in database
GPG Key ID: 37C999F617EA1A47
1 changed files with 5 additions and 3 deletions

View File

@ -666,9 +666,11 @@ static void destroy_backend(session_t *ps) {
if (ps->backend_data) {
// deinit backend
ps->backend_data->ops->destroy_blur_context(ps->backend_data,
ps->backend_blur_context);
ps->backend_blur_context = NULL;
if (ps->backend_blur_context) {
ps->backend_data->ops->destroy_blur_context(
ps->backend_data, ps->backend_blur_context);
ps->backend_blur_context = NULL;
}
ps->backend_data->ops->deinit(ps->backend_data);
ps->backend_data = NULL;
}