summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--macosx/tkMacOSXEmbed.c4
-rw-r--r--macosx/tkMacOSXWm.c4
2 files changed, 7 insertions, 1 deletions
diff --git a/macosx/tkMacOSXEmbed.c b/macosx/tkMacOSXEmbed.c
index 99f7584..0c2ca69 100644
--- a/macosx/tkMacOSXEmbed.c
+++ b/macosx/tkMacOSXEmbed.c
@@ -799,6 +799,10 @@ ContainerEventProc(
Container *containerPtr;
Tk_ErrorHandler errHandler;
+ if (!firstContainerPtr) {
+ TKLog(@"Embedded window has nil container.");
+ return;
+ }
/*
* Ignore any X protocol errors that happen in this procedure (almost any
* operation could fail, for example, if the embedded application has
diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c
index 4cd6efb..832cf2f 100644
--- a/macosx/tkMacOSXWm.c
+++ b/macosx/tkMacOSXWm.c
@@ -933,7 +933,9 @@ TkWmDeadWindow(
* Process all events immediately to force the closed window
* to be deallocated.
*/
- while (Tk_DoOneEvent(TK_ALL_EVENTS|TK_DONT_WAIT)) {}
+ if (winPtr->parentPtr) {
+ while (Tk_DoOneEvent(TK_WINDOW_EVENTS|TK_DONT_WAIT)) {}
+ }
[NSApp _resetAutoreleasePool];
#if DEBUG_ZOMBIES > 0