diff options
author | patthoyts <patthoyts@users.sourceforge.net> | 2008-08-01 19:38:58 (GMT) |
---|---|---|
committer | patthoyts <patthoyts@users.sourceforge.net> | 2008-08-01 19:38:58 (GMT) |
commit | 638e7df06d0096e3efb86c4410205fe56e10358d (patch) | |
tree | fe2825b400bfb502c075f42539458f482ff41849 /win/tkWinWm.c | |
parent | 62713768eda1dfeb194cbef982b9bbea710cd64d (diff) | |
download | tk-638e7df06d0096e3efb86c4410205fe56e10358d.zip tk-638e7df06d0096e3efb86c4410205fe56e10358d.tar.gz tk-638e7df06d0096e3efb86c4410205fe56e10358d.tar.bz2 |
Check wmPtr is valid in TopLevelReqProc to fix [Bug 2028703]
Diffstat (limited to 'win/tkWinWm.c')
-rw-r--r-- | win/tkWinWm.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/win/tkWinWm.c b/win/tkWinWm.c index 070bb3f..a82e9bb 100644 --- a/win/tkWinWm.c +++ b/win/tkWinWm.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: tkWinWm.c,v 1.127 2008/07/26 13:03:07 patthoyts Exp $ + * RCS: @(#) $Id: tkWinWm.c,v 1.128 2008/08/01 19:39:04 patthoyts Exp $ */ #include "tkWinInt.h" @@ -5874,13 +5874,15 @@ TopLevelReqProc( WmInfo *wmPtr; wmPtr = winPtr->wmInfoPtr; - if ((winPtr->flags & TK_EMBEDDED) && (wmPtr->wrapper != NULL)) { - SendMessage(wmPtr->wrapper, TK_GEOMETRYREQ, Tk_ReqWidth(tkwin), + if (wmPtr) { + if ((winPtr->flags & TK_EMBEDDED) && (wmPtr->wrapper != NULL)) { + SendMessage(wmPtr->wrapper, TK_GEOMETRYREQ, Tk_ReqWidth(tkwin), Tk_ReqHeight(tkwin)); - } - if (!(wmPtr->flags & (WM_UPDATE_PENDING|WM_NEVER_MAPPED))) { - Tcl_DoWhenIdle(UpdateGeometryInfo, winPtr); - wmPtr->flags |= WM_UPDATE_PENDING; + } + if (!(wmPtr->flags & (WM_UPDATE_PENDING|WM_NEVER_MAPPED))) { + Tcl_DoWhenIdle(UpdateGeometryInfo, winPtr); + wmPtr->flags |= WM_UPDATE_PENDING; + } } } |