summaryrefslogtreecommitdiffstats
path: root/mac/tkMacWindowMgr.c
diff options
context:
space:
mode:
authorjingham <jingham>2000-04-17 02:17:24 (GMT)
committerjingham <jingham>2000-04-17 02:17:24 (GMT)
commit1ecbbb9e134e10fc7a1e7f84c849b4715ff86282 (patch)
treea3b12e1bddef288682ac812ac0cd7787cd32ae48 /mac/tkMacWindowMgr.c
parentff5092fd9304f83ea30922dd2a5b2a1dca784994 (diff)
downloadtk-1ecbbb9e134e10fc7a1e7f84c849b4715ff86282.zip
tk-1ecbbb9e134e10fc7a1e7f84c849b4715ff86282.tar.gz
tk-1ecbbb9e134e10fc7a1e7f84c849b4715ff86282.tar.bz2
Protect GenerateKeyEvent from a null tkwin.
Diffstat (limited to 'mac/tkMacWindowMgr.c')
-rw-r--r--mac/tkMacWindowMgr.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/mac/tkMacWindowMgr.c b/mac/tkMacWindowMgr.c
index f751969..5e34c49 100644
--- a/mac/tkMacWindowMgr.c
+++ b/mac/tkMacWindowMgr.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacWindowMgr.c,v 1.7 2000/02/10 08:56:38 jingham Exp $
+ * RCS: @(#) $Id: tkMacWindowMgr.c,v 1.8 2000/04/17 02:17:24 jingham Exp $
*/
#include <Events.h>
@@ -729,6 +729,10 @@ GenerateKeyEvent(
dispPtr = TkGetDisplayList();
tkwin = Tk_IdToWindow(dispPtr->display, window);
+
+ if (tkwin == NULL) {
+ return false;
+ }
tkwin = (Tk_Window) ((TkWindow *) tkwin)->dispPtr->focusPtr;
if (tkwin == NULL) {
return false;