From c5f63fa138d8ba4ceb700f37f94563155467473a Mon Sep 17 00:00:00 2001 From: Steven Van Dorp Date: Thu, 12 Jun 2025 11:14:29 +0200 Subject: [PATCH] ephyr: fix possible segfault if eyphrCursorScreen is 0 Fixes: #38 Signed-off-by: Steven Van Dorp --- hw/kdrive/ephyr/ephyr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c index 311489a0b..2e0855c28 100644 --- a/hw/kdrive/ephyr/ephyr.c +++ b/hw/kdrive/ephyr/ephyr.c @@ -918,7 +918,7 @@ ephyrProcessMouseMotion(xcb_generic_event_t *xev) if (ephyrCursorScreen != screen->pScreen) { EPHYR_LOG("warping mouse cursor. " "cur_screen:%d, motion_screen:%d\n", - ephyrCursorScreen->myNum, screen->pScreen->myNum); + ephyrCursorScreen ? ephyrCursorScreen->myNum : -1, screen->pScreen->myNum); ephyrWarpCursor(inputInfo.pointer, screen->pScreen, motion->event_x, motion->event_y); }