From fc07ca004aaa338217c49e95f51b072b32c4f8c6 Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Tue, 20 Oct 2009 17:17:41 +0200 Subject: [PATCH] trace: Check for destroy before calling it --- src/gallium/drivers/trace/tr_drm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); } -- 2.30.2