diff options
Diffstat (limited to 'src/intel/intel_gpgpu.c')
-rw-r--r-- | src/intel/intel_gpgpu.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/intel/intel_gpgpu.c b/src/intel/intel_gpgpu.c index f9ff4a06..39b7e4db 100644 --- a/src/intel/intel_gpgpu.c +++ b/src/intel/intel_gpgpu.c @@ -180,6 +180,9 @@ void intel_gpgpu_delete_all(intel_driver_t *drv) static void intel_gpgpu_delete(intel_gpgpu_t *gpgpu) { + if (gpgpu == NULL) + return; + intel_driver_t *drv = gpgpu->drv; struct intel_gpgpu_node *p, *node; @@ -205,7 +208,6 @@ intel_gpgpu_delete(intel_gpgpu_t *gpgpu) drv->gpgpu_list = drv->gpgpu_list->next; intel_gpgpu_delete_finished(node->gpgpu); cl_free(node); - node = p->next; } } if (gpgpu == NULL) |