summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXEmbed.c
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2023-05-28 18:00:38 (GMT)
committerfvogel <fvogelnew1@free.fr>2023-05-28 18:00:38 (GMT)
commita8478dbe72692ec39e87ed86d2557f6490bb7c87 (patch)
tree0a9ca6f3e7ff69f5e7adafeadfcfa68ae75b97ac /macosx/tkMacOSXEmbed.c
parent0647e605adb3c6017eeb869e7bd4835770c07b2f (diff)
downloadtk-a8478dbe72692ec39e87ed86d2557f6490bb7c87.zip
tk-a8478dbe72692ec39e87ed86d2557f6490bb7c87.tar.gz
tk-a8478dbe72692ec39e87ed86d2557f6490bb7c87.tar.bz2
Third patch from Christopher Chavez.
Diffstat (limited to 'macosx/tkMacOSXEmbed.c')
-rw-r--r--macosx/tkMacOSXEmbed.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/macosx/tkMacOSXEmbed.c b/macosx/tkMacOSXEmbed.c
index 9a03178..72f2870 100644
--- a/macosx/tkMacOSXEmbed.c
+++ b/macosx/tkMacOSXEmbed.c
@@ -476,6 +476,10 @@ TkMacOSXGetHostToplevel(
{
TkWindow *contWinPtr, *topWinPtr;
+ if (!(winPtr && winPtr->privatePtr)) {
+ return NULL;
+ }
+
topWinPtr = winPtr->privatePtr->toplevel->winPtr;
if (!Tk_IsEmbedded(topWinPtr)) {
return winPtr->privatePtr->toplevel;
@@ -486,9 +490,6 @@ TkMacOSXGetHostToplevel(
* TODO: Here we should handle out of process embedding.
*/
- if (!contWinPtr) {
- return NULL;
- }
return TkMacOSXGetHostToplevel(contWinPtr);
}
@@ -700,7 +701,7 @@ TkpGetOtherWindow(
* process...
*/
- if (!(winPtr->flags & TK_BOTH_HALVES)) {
+ if (!(winPtr && (winPtr->flags & TK_BOTH_HALVES))) {
return NULL;
}