Fixed XIM crash when locale is set to something not supported by X11.
authorSam Lantinga <slouken@libsdl.org>
Fri, 15 Mar 2013 11:59:16 -0700
changeset 7007 2381f4d531d1
parent 7006 ffcf28627e1c
child 7008 e0f05e041a72
Fixed XIM crash when locale is set to something not supported by X11.
src/video/x11/SDL_x11window.c
--- a/src/video/x11/SDL_x11window.c	Fri Mar 15 11:56:28 2013 -0700
+++ b/src/video/x11/SDL_x11window.c	Fri Mar 15 11:59:16 2013 -0700
@@ -220,7 +220,7 @@
     data->window = window;
     data->xwindow = w;
 #ifdef X_HAVE_UTF8_STRING
-    if (SDL_X11_HAVE_UTF8) {
+    if (SDL_X11_HAVE_UTF8 && videodata->im) {
         data->ic =
             pXCreateIC(videodata->im, XNClientWindow, w, XNFocusWindow, w,
                        XNInputStyle, XIMPreeditNothing | XIMStatusNothing,