From dee16344ce5fec67463323b93a9cf65e6cc7e821 Mon Sep 17 00:00:00 2001 From: Zedhugh Chen Date: Mon, 22 Dec 2025 09:33:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20xwindow=5Fget=5Ftext=5Fpro?= =?UTF-8?q?perty=20=E5=87=BD=E6=95=B0=E4=B8=AD=E8=BF=94=E5=9B=9E=20reply?= =?UTF-8?q?=20=E4=B8=BA=20NULL=20=E9=80=A0=E6=88=90=E7=9A=84=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/xwindow.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/xwindow.c b/src/xwindow.c index 9870080..02a0f63 100644 --- a/src/xwindow.c +++ b/src/xwindow.c @@ -187,6 +187,8 @@ void xwindow_get_text_property(xcb_window_t window, xcb_atom_t property, wm.xcb_conn, false, window, property, XCB_ATOM_ANY, 0, UINT32_MAX); xcb_get_property_reply_t *reply = xcb_get_property_reply(wm.xcb_conn, cookie, nullptr); + if (!reply) return; + int length = xcb_get_property_value_length(reply); char *value = xcb_get_property_value(reply);