summaryrefslogtreecommitdiffstats
path: root/unix/tkUnixWm.c
diff options
context:
space:
mode:
Diffstat (limited to 'unix/tkUnixWm.c')
-rw-r--r--unix/tkUnixWm.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/unix/tkUnixWm.c b/unix/tkUnixWm.c
index e79b5b1..ee43db5 100644
--- a/unix/tkUnixWm.c
+++ b/unix/tkUnixWm.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: tkUnixWm.c,v 1.50 2005/11/16 02:51:38 jenglish Exp $
+ * RCS: @(#) $Id: tkUnixWm.c,v 1.51 2006/05/29 22:21:40 hobbs Exp $
*/
#include "tkPort.h"
@@ -4457,6 +4457,8 @@ UpdateGeometryInfo(
if ((winPtr->flags & (TK_EMBEDDED|TK_BOTH_HALVES))
== (TK_EMBEDDED|TK_BOTH_HALVES)) {
+ TkWindow *childPtr = TkpGetOtherWindow(winPtr);
+
/*
* This window is embedded and the container is also in this process,
* so we don't need to do anything special about the geometry, except
@@ -4468,8 +4470,9 @@ UpdateGeometryInfo(
wmPtr->x = wmPtr->y = 0;
wmPtr->flags &= ~(WM_NEGATIVE_X|WM_NEGATIVE_Y);
height += wmPtr->menuHeight;
- Tk_GeometryRequest((Tk_Window) TkpGetOtherWindow(winPtr),
- width, height);
+ if (childPtr != NULL) {
+ Tk_GeometryRequest((Tk_Window) childPtr, width, height);
+ }
return;
}
serial = NextRequest(winPtr->display);
@@ -5576,6 +5579,9 @@ Tk_CoordsToWindow(
*/
winPtr = TkpGetOtherWindow(winPtr);
+ if (winPtr == NULL) {
+ return NULL;
+ }
wmPtr = winPtr->wmInfoPtr;
childX = x;
childY = y;