From: Jakob Bornecrantz Date: Tue, 20 Oct 2009 15:17:41 +0000 (+0200) Subject: trace: Check for destroy before calling it X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fc07ca004aaa338217c49e95f51b072b32c4f8c6;p=mesa.git trace: Check for destroy before calling it --- 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); }