diff options
author | davygrvy <davygrvy@noemail.net> | 2003-12-13 01:07:35 (GMT) |
---|---|---|
committer | davygrvy <davygrvy@noemail.net> | 2003-12-13 01:07:35 (GMT) |
commit | 191aaba63e00ef61820338cd8ba80cdb136ea3f6 (patch) | |
tree | 8fdab630c699b513013cbb45925910ea1a1ec649 | |
parent | e16f01fd845726a11ba4bf0b4a308bdf47695836 (diff) | |
download | tk-191aaba63e00ef61820338cd8ba80cdb136ea3f6.zip tk-191aaba63e00ef61820338cd8ba80cdb136ea3f6.tar.gz tk-191aaba63e00ef61820338cd8ba80cdb136ea3f6.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.
FossilOrigin-Name: 998bb6de957ef8ad1431d5b0e66af9a4523cb080
-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) { |