From e85f7a9c2214d651415ba05c49c96aa0741deb26 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Fri, 25 Sep 2026 20:05:25 +0200 Subject: [PATCH] Xephyr: fix segfault in hostx_set_win_title during startup screen->pScreen is NULL during hostx_init() because it's set later during screen initialization. Use screen->mynum (the KdScreenInfo's screen number) which is available from the start. Also fix hostx_paint_rect for consistency. Signed-off-by: Enrico Weigelt, metux IT consult --- hw/kdrive/ephyr/hostx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/kdrive/ephyr/hostx.c b/hw/kdrive/ephyr/hostx.c index b8b2064cf9..d22fda5051 100644 --- a/hw/kdrive/ephyr/hostx.c +++ b/hw/kdrive/ephyr/hostx.c @@ -196,7 +196,7 @@ hostx_set_win_title(KdScreenInfo *screen, const char *extra_text) memset(buf, 0, BUF_LEN + 1); snprintf(buf, BUF_LEN, "Xephyr on %s.%d %s", HostX.server_dpy_name ? HostX.server_dpy_name : ":0", - screen->pScreen->myNum, (extra_text != NULL) ? extra_text : ""); + screen->mynum, (extra_text != NULL) ? extra_text : ""); xcb_icccm_set_wm_name(HostX.conn, scrpriv->win, @@ -1038,7 +1038,7 @@ hostx_paint_rect(KdScreenInfo *screen, { EphyrScrPriv *scrpriv = screen->driver; - EPHYR_DBG("painting in screen %d\n", screen->pScreen->myNum); + EPHYR_DBG("painting in screen %d\n", screen->mynum); #ifdef GLAMOR if (ephyr_glamor) {