summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakob Bornecrantz <[email protected]>2009-10-20 17:17:41 +0200
committerJakob Bornecrantz <[email protected]>2009-10-20 17:19:05 +0200
commitfc07ca004aaa338217c49e95f51b072b32c4f8c6 (patch)
tree958def4b02e2c8d072b4d1f4acb0bc609396795a
parenta9f71b3bba86771be56ff1def716beb370decd22 (diff)
trace: Check for destroy before calling it
-rw-r--r--src/gallium/drivers/trace/tr_drm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/drivers/trace/tr_drm.c b/src/gallium/drivers/trace/tr_drm.c
index 781ca5d3bc0..48d1c4051cc 100644
--- a/src/gallium/drivers/trace/tr_drm.c
+++ b/src/gallium/drivers/trace/tr_drm.c
@@ -150,7 +150,9 @@ trace_drm_destroy(struct drm_api *_api)
{
struct trace_drm_api *tr_api = trace_drm_api(_api);
struct drm_api *api = tr_api->api;
- api->destroy(api);
+
+ if (api->destroy)
+ api->destroy(api);
free(tr_api);
}