summaryrefslogtreecommitdiffstats
path: root/src/ufo-interpolate-stream-task.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ufo-interpolate-stream-task.c')
-rw-r--r--src/ufo-interpolate-stream-task.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ufo-interpolate-stream-task.c b/src/ufo-interpolate-stream-task.c
index a3c854d..eefd4f7 100644
--- a/src/ufo-interpolate-stream-task.c
+++ b/src/ufo-interpolate-stream-task.c
@@ -232,8 +232,10 @@ ufo_interpolate_stream_task_finalize (GObject *object)
priv = UFO_INTERPOLATE_STREAM_TASK_GET_PRIVATE (object);
g_ptr_array_free (priv->copies, TRUE);
- UFO_RESOURCES_CHECK_CLERR (clReleaseKernel (priv->kernel));
- priv->kernel = NULL;
+ if (priv->kernel) {
+ UFO_RESOURCES_CHECK_CLERR (clReleaseKernel (priv->kernel));
+ priv->kernel = NULL;
+ }
G_OBJECT_CLASS (ufo_interpolate_stream_task_parent_class)->finalize (object);
}