diff options
author | davygrvy <davygrvy> | 2003-12-13 01:07:35 (GMT) |
---|---|---|
committer | davygrvy <davygrvy> | 2003-12-13 01:07:35 (GMT) |
commit | de7d3bba104ed74ef20b4fc94f16fc0e21d61abf (patch) | |
tree | 8fdab630c699b513013cbb45925910ea1a1ec649 /win | |
parent | 9d8614e821fb5dc8a5eedad902876c466247386f (diff) | |
download | tk-de7d3bba104ed74ef20b4fc94f16fc0e21d61abf.zip tk-de7d3bba104ed74ef20b4fc94f16fc0e21d61abf.tar.gz tk-de7d3bba104ed74ef20b4fc94f16fc0e21d61abf.tar.bz2 |
(TkWinEmbeddedEventProc) : for loop dereferences containerPtr but can't
get to the if (containerPtr == NULL) test due to the unhandled read
memory exception for when it really is NULL.
Diffstat (limited to 'win')
-rw-r--r-- | win/tkWinEmbed.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/win/tkWinEmbed.c b/win/tkWinEmbed.c index 990ff29..19d4506 100644 --- a/win/tkWinEmbed.c +++ b/win/tkWinEmbed.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWinEmbed.c,v 1.7 2002/08/05 04:30:41 dgp Exp $ + * RCS: @(#) $Id: tkWinEmbed.c,v 1.8 2003/12/13 01:07:35 davygrvy Exp $ */ #include "tkWinInt.h" @@ -385,11 +385,13 @@ TkWinEmbeddedEventProc(hwnd, message, wParam, lParam) */ for (containerPtr = tsdPtr->firstContainerPtr; - containerPtr->parentHWnd != hwnd; + containerPtr && containerPtr->parentHWnd != hwnd; containerPtr = containerPtr->nextPtr) { - if (containerPtr == NULL) { - panic("TkWinContainerProc couldn't find Container record"); - } + /* empty loop body */ + } + + if (containerPtr == NULL) { + Tcl_Panic("TkWinContainerProc couldn't find Container record"); } switch (message) { |