check return value of XCreateIC()

This commit is contained in:
Hiltjo Posthuma committed 2026-10-16 13:05:13 +02:00
1 parent 61e0072c3e
commit 8627d0c659
1 file changed
+3 -2
+3 -2
View File
@@ -698,8 +698,9 @@ setup(void)
if ((xim = XOpenIM(dpy, NULL, NULL, NULL)) == NULL)
die("XOpenIM failed: could not open input device");
xic = XCreateIC(xim, XNInputStyle, XIMPreeditNothing | XIMStatusNothing,
XNClientWindow, win, XNFocusWindow, win, NULL);
if ((xic = XCreateIC(xim, XNInputStyle, XIMPreeditNothing | XIMStatusNothing,
XNClientWindow, win, XNFocusWindow, win, NULL)) == NULL)
die("XCreateIC failed: could not obtain input context");
XMapRaised(dpy, win);
if (embed) {