diff options
-rw-r--r-- | macosx/tkMacOSXEmbed.c | 3 | ||||
-rw-r--r-- | unix/tkUnixEmbed.c | 1 | ||||
-rw-r--r-- | win/tkWinEmbed.c | 2 |
3 files changed, 5 insertions, 1 deletions
diff --git a/macosx/tkMacOSXEmbed.c b/macosx/tkMacOSXEmbed.c index 4af2e75..2f04e74 100644 --- a/macosx/tkMacOSXEmbed.c +++ b/macosx/tkMacOSXEmbed.c @@ -1116,6 +1116,9 @@ EmbedWindowDeleted( prevPtr = NULL; containerPtr = firstContainerPtr; while (1) { + if (containerPtr == NULL) { + return; + } if (containerPtr->embeddedPtr == winPtr) { /* * We also have to destroy our parent, to clean up the container. diff --git a/unix/tkUnixEmbed.c b/unix/tkUnixEmbed.c index a33a623..ff7860b 100644 --- a/unix/tkUnixEmbed.c +++ b/unix/tkUnixEmbed.c @@ -979,6 +979,7 @@ EmbedWindowDeleted( prevPtr = NULL; containerPtr = tsdPtr->firstContainerPtr; while (1) { + if (containerPtr == NULL) return; if (containerPtr->embeddedPtr == winPtr) { containerPtr->wrapper = None; containerPtr->embeddedPtr = NULL; diff --git a/win/tkWinEmbed.c b/win/tkWinEmbed.c index 1c6ba6c..36c6047 100644 --- a/win/tkWinEmbed.c +++ b/win/tkWinEmbed.c @@ -1088,8 +1088,8 @@ EmbedWindowDeleted( prevPtr = NULL; containerPtr = tsdPtr->firstContainerPtr; - if (containerPtr == NULL) return; while (1) { + if (containerPtr == NULL) return; if (containerPtr->embeddedPtr == winPtr) { containerPtr->embeddedHWnd = NULL; containerPtr->embeddedPtr = NULL; |