diff options
author | Kirill Primak <vyivel@eclair.cafe> | 2022-11-06 13:54:24 +0300 |
---|---|---|
committer | Kirill Primak <vyivel@eclair.cafe> | 2022-11-06 17:00:00 +0300 |
commit | 099b9de752f9cc212140533a8a2e20b31aa9028f (patch) | |
tree | 1888f3030d586908acc02651b93dccd0e7b83199 /xwayland | |
parent | 32daa43a454bcea1306ad0976fd4161ce8c7e86f (diff) |
compositor: drop role object NULL checks in handlers
Instead, move the check to the caller.
Diffstat (limited to 'xwayland')
-rw-r--r-- | xwayland/xwm.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/xwayland/xwm.c b/xwayland/xwm.c index 8f4c0ebb..3a3d35f2 100644 --- a/xwayland/xwm.c +++ b/xwayland/xwm.c @@ -824,9 +824,6 @@ static void read_surface_property(struct wlr_xwm *xwm, static void xwayland_surface_role_commit(struct wlr_surface *wlr_surface) { assert(wlr_surface->role == &xwayland_surface_role); struct wlr_xwayland_surface *surface = wlr_surface->role_data; - if (surface == NULL) { - return; - } if (!surface->mapped && wlr_surface_has_buffer(surface->surface)) { surface->mapped = true; @@ -839,9 +836,6 @@ static void xwayland_surface_role_precommit(struct wlr_surface *wlr_surface, const struct wlr_surface_state *state) { assert(wlr_surface->role == &xwayland_surface_role); struct wlr_xwayland_surface *surface = wlr_surface->role_data; - if (surface == NULL) { - return; - } if (state->committed & WLR_SURFACE_STATE_BUFFER && state->buffer == NULL) { // This is a NULL commit @@ -856,9 +850,6 @@ static void xwayland_surface_role_precommit(struct wlr_surface *wlr_surface, static void xwayland_surface_role_destroy(struct wlr_surface *wlr_surface) { assert(wlr_surface->role == &xwayland_surface_role); struct wlr_xwayland_surface *surface = wlr_surface->role_data; - if (surface == NULL) { - return; - } if (surface->mapped) { wl_signal_emit_mutable(&surface->events.unmap, surface); |