Skip to content

Commit c191bfa

Browse files
committed
Check if there's a focused surface before getting its root
1 parent 1599650 commit c191bfa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/surface/view.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ void View::begin_interactive(const CursorMode mode, const uint32_t edges) {
105105
Cursor& cursor = server.seat->cursor;
106106
wlr_surface* focused_surface = server.seat->wlr->pointer_state.focused_surface;
107107

108-
if (get_wlr_surface() != wlr_surface_get_root_surface(focused_surface)) {
108+
if (focused_surface == nullptr || get_wlr_surface() != wlr_surface_get_root_surface(focused_surface)) {
109109
/* Deny move/resize requests from unfocused clients. */
110110
return;
111111
}

0 commit comments

Comments
 (0)