diff options
author | Tony Crisci <tony@dubstepdish.com> | 2017-12-20 05:51:23 -0500 |
---|---|---|
committer | Tony Crisci <tony@dubstepdish.com> | 2017-12-20 05:51:23 -0500 |
commit | ee39dff1e7de4a234f2ff39c1ce2df6bc84abb04 (patch) | |
tree | 11bc54fad4ab8d1b4b6bc4cec0c07fca072ab8d0 /backend | |
parent | ca6a0ef1bbbd611c9ebf0ace08b8fc6af3883d09 (diff) |
rootston: handle backend creation failed
Diffstat (limited to 'backend')
-rw-r--r-- | backend/multi/backend.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/backend/multi/backend.c b/backend/multi/backend.c index e6be4a20..c000342b 100644 --- a/backend/multi/backend.c +++ b/backend/multi/backend.c @@ -42,7 +42,6 @@ static void subbackend_state_destroy(struct subbackend_state *sub) { static void multi_backend_destroy(struct wlr_backend *wlr_backend) { struct wlr_multi_backend *backend = (struct wlr_multi_backend *)wlr_backend; - wl_list_remove(&backend->display_destroy.link); struct subbackend_state *sub, *next; wl_list_for_each_safe(sub, next, &backend->backends, link) { // XXX do we really want to take ownership over added backends? @@ -190,3 +189,9 @@ struct wlr_session *wlr_multi_get_session(struct wlr_backend *_backend) { } return NULL; } + +bool wlr_multi_is_empty(struct wlr_backend *_backend) { + assert(wlr_backend_is_multi(_backend)); + struct wlr_multi_backend *backend = (struct wlr_multi_backend *)_backend; + return wl_list_length(&backend->backends) < 1; +} |