diff options
author | patthoyts@users.sourceforge.net <patthoyts> | 2011-03-10 15:27:35 (GMT) |
---|---|---|
committer | patthoyts@users.sourceforge.net <patthoyts> | 2011-03-10 15:27:35 (GMT) |
commit | 928b1e437e6172213c3d63f3d1bc4a6d4e6a3afb (patch) | |
tree | 032f601ecb5eebc2f61964365a40d563046cfc73 | |
parent | 9bdd2fbd838765ca5e1d03a50866cd9def017013 (diff) | |
download | tk-928b1e437e6172213c3d63f3d1bc4a6d4e6a3afb.zip tk-928b1e437e6172213c3d63f3d1bc4a6d4e6a3afb.tar.gz tk-928b1e437e6172213c3d63f3d1bc4a6d4e6a3afb.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>
-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 67c2a6e..290fe3e 100644 --- a/win/tkWinWm.c +++ b/win/tkWinWm.c @@ -8635,9 +8635,10 @@ RemapWindows(winPtr, parentHWND) 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) { |