diff options
author | patthoyts@users.sourceforge.net <patthoyts> | 2008-08-01 19:38:58 (GMT) |
---|---|---|
committer | patthoyts@users.sourceforge.net <patthoyts> | 2008-08-01 19:38:58 (GMT) |
commit | 7bf7fc934e49b4b68a23a120ce3ce9a99619e75a (patch) | |
tree | fe2825b400bfb502c075f42539458f482ff41849 /win | |
parent | 5f89c906f42f2f40191cbd8f315316221b8f4ed4 (diff) | |
download | tk-7bf7fc934e49b4b68a23a120ce3ce9a99619e75a.zip tk-7bf7fc934e49b4b68a23a120ce3ce9a99619e75a.tar.gz tk-7bf7fc934e49b4b68a23a120ce3ce9a99619e75a.tar.bz2 |
Check wmPtr is valid in TopLevelReqProc to fix [Bug 2028703]
Diffstat (limited to 'win')
-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; + } } } |