trace: Check for destroy before calling it
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user