From 1ecbbb9e134e10fc7a1e7f84c849b4715ff86282 Mon Sep 17 00:00:00 2001 From: jingham Date: Mon, 17 Apr 2000 02:17:24 +0000 Subject: Protect GenerateKeyEvent from a null tkwin. --- mac/tkMacWindowMgr.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 @@ -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; -- cgit v0.12