Fix some warnings from clang-tidy

Notably this fixes a possible null pointer dereference in warp_cursor()
when output_nearest_to_cursor() returns null.
This commit is contained in:
tokyo4j 2025-07-28 13:54:10 +09:00 committed by Consolatis
parent b3b6715cdf
commit bdaf85eda1
3 changed files with 6 additions and 9 deletions

View file

@ -302,6 +302,7 @@ process_cursor_resize(struct server *server, uint32_t time)
static uint32_t last_resize_time = 0;
static struct view *last_resize_view = NULL;
assert(server->grabbed_view);
if (server->grabbed_view == last_resize_view) {
int32_t refresh = 0;
if (output_is_usable(last_resize_view->output)) {