diff options
author | georgeps <georgeps> | 2009-01-11 19:05:17 (GMT) |
---|---|---|
committer | georgeps <georgeps> | 2009-01-11 19:05:17 (GMT) |
commit | 31bc7b0f98e954ee151b1e48c7d859a349ac1027 (patch) | |
tree | c5a9e0756685eb30be669c950a7c698ded9ced84 /generic | |
parent | 9cf1b3f4c61056a489fc431e79d6408223c2399d (diff) | |
download | tk-31bc7b0f98e954ee151b1e48c7d859a349ac1027.zip tk-31bc7b0f98e954ee151b1e48c7d859a349ac1027.tar.gz tk-31bc7b0f98e954ee151b1e48c7d859a349ac1027.tar.bz2 |
* generic/tkEvent.c: Fix a possible segv due to a NULL
pointer dereference that occurs when XCreateIC fails.
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkEvent.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/generic/tkEvent.c b/generic/tkEvent.c index 13e1304..bcadee5 100644 --- a/generic/tkEvent.c +++ b/generic/tkEvent.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkEvent.c,v 1.38 2008/12/28 22:59:47 dkf Exp $ + * RCS: @(#) $Id: tkEvent.c,v 1.39 2009/01/11 19:05:17 georgeps Exp $ */ #include "tkInt.h" @@ -353,6 +353,12 @@ CreateXIC( XFree(preedit_attlist); } + + if (winPtr->inputContext == NULL) { + /* XCreateIC failed. */ + return; + } + /* * Adjust the window's event mask if the IM requires it. */ |