types/wlr_drm_lease_v1: add NULL check to drm lease resource destroy

This commit is contained in:
Simon Zeni 2021-11-30 14:51:07 -05:00 committed by Simon Ser
parent 697a1cd0f5
commit dd84c5a1cc
1 changed files with 3 additions and 1 deletions

View File

@ -218,8 +218,10 @@ void wlr_drm_lease_v1_revoke(struct wlr_drm_lease_v1 *lease) {
static void drm_lease_v1_handle_resource_destroy(struct wl_resource *resource) {
struct wlr_drm_lease_v1 *lease = drm_lease_v1_from_resource(resource);
if (lease != NULL) {
wlr_drm_lease_terminate(lease->drm_lease);
}
}
static void drm_lease_v1_handle_destroy(
struct wl_client *client, struct wl_resource *resource) {