diff options
-rw-r--r-- | types/wlr_drm_lease_v1.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/types/wlr_drm_lease_v1.c b/types/wlr_drm_lease_v1.c index 7da40686..7063e0d3 100644 --- a/types/wlr_drm_lease_v1.c +++ b/types/wlr_drm_lease_v1.c @@ -218,7 +218,9 @@ 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); - wlr_drm_lease_terminate(lease->drm_lease); + if (lease != NULL) { + wlr_drm_lease_terminate(lease->drm_lease); + } } static void drm_lease_v1_handle_destroy( |