mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 04:58:05 +02:00
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:
parent
a6bfdd7b46
commit
a93ab73a07
1 changed files with 3 additions and 1 deletions
|
|
@ -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;
|
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);
|
free(sync);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue