diff options
author | culler <culler> | 2018-08-18 21:15:14 (GMT) |
---|---|---|
committer | culler <culler> | 2018-08-18 21:15:14 (GMT) |
commit | a56ebfbce55408f33a4b635507c6b92b44a9acbc (patch) | |
tree | c3dff9081feb3b18c0a01699fb2c9cf4d022f75e /macosx | |
parent | e96f68e8db5de462ddac02cfd3eca3189cbcaae1 (diff) | |
parent | 6ca374c53e57e1e72cb25d6c38b1e9ff5c9374b7 (diff) | |
download | tk-a56ebfbce55408f33a4b635507c6b92b44a9acbc.zip tk-a56ebfbce55408f33a4b635507c6b92b44a9acbc.tar.gz tk-a56ebfbce55408f33a4b635507c6b92b44a9acbc.tar.bz2 |
Fix bug [c2c5bdb4aa]: segfault when opening colorpicker
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/tkMacOSXWm.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c index b90e75c..a0fda96 100644 --- a/macosx/tkMacOSXWm.c +++ b/macosx/tkMacOSXWm.c @@ -236,11 +236,13 @@ static int windowHashInit = false; { NSRect currentFrame = [sender frame]; TkWindow *winPtr = TkMacOSXGetTkWindow(sender); - if (winPtr->wmInfoPtr->flags & WM_WIDTH_NOT_RESIZABLE) { - frameSize.width = currentFrame.size.width; - } - if (winPtr->wmInfoPtr->flags & WM_HEIGHT_NOT_RESIZABLE) { - frameSize.height = currentFrame.size.height; + if (winPtr) { + if (winPtr->wmInfoPtr->flags & WM_WIDTH_NOT_RESIZABLE) { + frameSize.width = currentFrame.size.width; + } + if (winPtr->wmInfoPtr->flags & WM_HEIGHT_NOT_RESIZABLE) { + frameSize.height = currentFrame.size.height; + } } return frameSize; } |