summaryrefslogtreecommitdiff
path: root/src/mesa
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2007-05-18 12:59:39 -0700
committerEric Anholt <eric@anholt.net>2007-05-18 12:59:39 -0700
commit431baf221ea7858ecb5edb2a5a01b5f993147a4d (patch)
tree13f190f66891902e0bd318b9c182468fba91d023 /src/mesa
parent425d0c6305f7781788077452ae9e2de595b0961d (diff)
Allow unreference with a NULL argument.
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/common/dri_bufmgr.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/common/dri_bufmgr.c b/src/mesa/drivers/dri/common/dri_bufmgr.c
index f60d3b0db6..dd76e8ead6 100644
--- a/src/mesa/drivers/dri/common/dri_bufmgr.c
+++ b/src/mesa/drivers/dri/common/dri_bufmgr.c
@@ -58,6 +58,9 @@ dri_bo_reference(dri_bo *bo)
void
dri_bo_unreference(dri_bo *bo)
{
+ if (bo == NULL)
+ return;
+
bo->bufmgr->bo_unreference(bo);
}
@@ -100,6 +103,9 @@ dri_fence_reference(dri_fence *fence)
void
dri_fence_unreference(dri_fence *fence)
{
+ if (fence == NULL)
+ return;
+
fence->bufmgr->fence_unreference(fence);
}