From 25bb92faeec27fa67340eb417d427ce721dc3218 Mon Sep 17 00:00:00 2001 From: Simon Zeni Date: Fri, 19 Nov 2021 10:44:45 -0500 Subject: [PATCH] backend/multi: add asserts in wlr_multi_backend_add --- backend/multi/backend.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/multi/backend.c b/backend/multi/backend.c index 2309691d4..b06bc4865 100644 --- a/backend/multi/backend.c +++ b/backend/multi/backend.c @@ -189,6 +189,9 @@ static struct subbackend_state *multi_backend_get_subbackend(struct wlr_multi_ba bool wlr_multi_backend_add(struct wlr_backend *_multi, struct wlr_backend *backend) { + assert(_multi && backend); + assert(_multi != backend); + struct wlr_multi_backend *multi = multi_backend_from_backend(_multi); if (multi_backend_get_subbackend(multi, backend)) {