aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Zeni <simon@bl4ckb0ne.ca>2021-11-30 14:51:07 -0500
committerSimon Ser <contact@emersion.fr>2021-11-30 19:59:55 +0000
commitdd84c5a1ccc322c4775282bbfc781f17e4ddac3a (patch)
tree82c33f408403110e465678b0e35956d11bd9bfff
parent697a1cd0f59f9a64f02e47b0f62a7184d04ad794 (diff)
types/wlr_drm_lease_v1: add NULL check to drm lease resource destroy
-rw-r--r--types/wlr_drm_lease_v1.c4
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(