diff options
author | patthoyts <patthoyts@users.sourceforge.net> | 2011-03-10 12:26:38 (GMT) |
---|---|---|
committer | patthoyts <patthoyts@users.sourceforge.net> | 2011-03-10 12:26:38 (GMT) |
commit | 352d73cdf518b78ec290bce0f2e3c0930f635133 (patch) | |
tree | c3ca138ca3bba74904582c75461dc716c55a329f /win/tkWinWm.c | |
parent | e3936d97898ad60cae3136709e8d443c97f4515d (diff) | |
download | tk-352d73cdf518b78ec290bce0f2e3c0930f635133.zip tk-352d73cdf518b78ec290bce0f2e3c0930f635133.tar.gz tk-352d73cdf518b78ec290bce0f2e3c0930f635133.tar.bz2 |
[Bug 3205260] avoid crash in wm manage of children with null class
The tkhtml widget doesn't set it's window class. The Windows implementation
of the wm manage command checks to see if the contained window is actually
a menu (looking for torn-off menus) by examining the class. This patch
adds a check for a null class to avoid crashing as suggested.
Suggested-by: Eric Boudaillier <beric@users.sourceforge.net>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Diffstat (limited to 'win/tkWinWm.c')
-rw-r--r-- | win/tkWinWm.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/win/tkWinWm.c b/win/tkWinWm.c index 94c8bb8..6b151cb 100644 --- a/win/tkWinWm.c +++ b/win/tkWinWm.c @@ -8545,12 +8545,13 @@ RemapWindows( HWND parentHWND) { TkWindow *childPtr; + const char *className = Tk_Class(winPtr); /* * Skip menus as they are handled differently. */ - if (strcmp(Tk_Class(winPtr), "Menu") == 0) { + if (className != NULL && strcmp(className, "Menu") == 0) { return; } if (winPtr->window) { |