summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgeorgeps <georgeps>2009-01-11 19:29:42 (GMT)
committergeorgeps <georgeps>2009-01-11 19:29:42 (GMT)
commit5e6717df983f423fbf7da7d49d240ea7785a8ddf (patch)
treef762b76ea4a3f50bb34e5312d046fdc3350a9f0e
parentd3fa4656ff2cc2112b73213861cb0f59868094fe (diff)
downloadtk-5e6717df983f423fbf7da7d49d240ea7785a8ddf.zip
tk-5e6717df983f423fbf7da7d49d240ea7785a8ddf.tar.gz
tk-5e6717df983f423fbf7da7d49d240ea7785a8ddf.tar.bz2
* generic/tkEvent.c: Backport a fix from 8.6 for a NULL pointer
dereference in CreateXIC.
-rw-r--r--ChangeLog5
-rw-r--r--generic/tkEvent.c8
2 files changed, 12 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index dd7ea8c..4d4886b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-01-11 George Peter Staplin <georgeps@users.sourceforge.net>
+
+ * generic/tkEvent.c: Backport a fix from 8.6 for a NULL pointer
+ dereference in CreateXIC.
+
2009-01-07 Pat Thoyts <patthoyts@users.sourceforge.net>
* win/tkWinWm.c: Backported fix for [Bug 1847002] to prevent the
diff --git a/generic/tkEvent.c b/generic/tkEvent.c
index 2f27eab..2a13871 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.35.2.1 2008/08/05 20:31:53 jenglish Exp $
+ * RCS: @(#) $Id: tkEvent.c,v 1.35.2.2 2009/01/11 19:29:42 georgeps Exp $
*/
#include "tkInt.h"
@@ -359,6 +359,12 @@ CreateXIC(
XFree(preedit_attlist);
}
+
+ if (winPtr->inputContext == NULL) {
+ /* XCreateIC failed. */
+ return;
+ }
+
/*
* Adjust the window's event mask if the IM requires it.
*/