trace: Check for destroy before calling it

This commit is contained in:
Jakob Bornecrantz
2009-10-20 17:17:41 +02:00
parent a9f71b3bba
commit fc07ca004a
+3 -1
View File
@@ -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);
}