Signed-off-by: Ismael Luceno <[email protected]>
---
dmenu.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/dmenu.c b/dmenu.c
index 8d9bbb6..9625705 100644
--- a/dmenu.c
+++ b/dmenu.c
@@ -608,7 +608,10 @@ setup(void) {
CWOverrideRedirect | CWBackPixel | CWEventMask,
&swa);
/* open input methods */
- xim = XOpenIM(dc->dpy, NULL, NULL, NULL);
+ if (!(xim = XOpenIM(dc->dpy, NULL, NULL, NULL))) {
+ fputs("dmenu: Failed to open input method\n", stderr);
+ exit(EXIT_FAILURE);
+ }
xic = XCreateIC(xim, XNInputStyle, XIMPreeditNothing | XIMStatusNothing,
XNClientWindow, win, XNFocusWindow, win, NULL);
--
1.8.4.2