修复 xwindow_get_text_property 函数中返回 reply 为 NULL 造成的 bug
This commit is contained in:
@@ -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);
|
wm.xcb_conn, false, window, property, XCB_ATOM_ANY, 0, UINT32_MAX);
|
||||||
xcb_get_property_reply_t *reply =
|
xcb_get_property_reply_t *reply =
|
||||||
xcb_get_property_reply(wm.xcb_conn, cookie, nullptr);
|
xcb_get_property_reply(wm.xcb_conn, cookie, nullptr);
|
||||||
|
if (!reply) return;
|
||||||
|
|
||||||
int length = xcb_get_property_value_length(reply);
|
int length = xcb_get_property_value_length(reply);
|
||||||
char *value = xcb_get_property_value(reply);
|
char *value = xcb_get_property_value(reply);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user