i965/sync: Don't crash when deleting sync object
Don't pass NULL to drm_intel_bo_unreference(). It doesn't like that. Bug found by code inspection. Reviewed-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
@@ -59,7 +59,9 @@ intel_delete_sync_object(struct gl_context *ctx, struct gl_sync_object *s)
|
||||
{
|
||||
struct intel_sync_object *sync = (struct intel_sync_object *)s;
|
||||
|
||||
drm_intel_bo_unreference(sync->bo);
|
||||
if (sync->bo)
|
||||
drm_intel_bo_unreference(sync->bo);
|
||||
|
||||
free(sync);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user