summaryrefslogtreecommitdiffstats
path: root/generic/tkCanvWind.c
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2022-03-19 23:36:01 (GMT)
committerfvogel <fvogelnew1@free.fr>2022-03-19 23:36:01 (GMT)
commit278d27a0a645420f41cae22044ccc649cfe35176 (patch)
tree0d4e2699b389edf2d5026baea6b96d103df70eda /generic/tkCanvWind.c
parentad1bcacba363899b34e3522e366e67f74ed7560d (diff)
parent2ef21d2a470c323fd6ece255ba9213f3c4d156d0 (diff)
downloadtk-278d27a0a645420f41cae22044ccc649cfe35176.zip
tk-278d27a0a645420f41cae22044ccc649cfe35176.tar.gz
tk-278d27a0a645420f41cae22044ccc649cfe35176.tar.bz2
Fix [5412c64a79]: Segmentation fault on closing error report window. This deals with when a canvas embedded window gets destroyed through a binding to <Configure>. Also scheduled idletasks for deleted containers must be canceled.
Diffstat (limited to 'generic/tkCanvWind.c')
-rw-r--r--generic/tkCanvWind.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/generic/tkCanvWind.c b/generic/tkCanvWind.c
index 3031a94..0dca594 100644
--- a/generic/tkCanvWind.c
+++ b/generic/tkCanvWind.c
@@ -580,6 +580,9 @@ DisplayWinItem(
if (winItemPtr->tkwin == NULL) {
return;
}
+
+ Tcl_Preserve(canvas);
+
if (state == TK_STATE_NULL) {
state = Canvas(canvas)->canvas_state;
}
@@ -594,6 +597,7 @@ DisplayWinItem(
} else {
Tk_UnmaintainGeometry(winItemPtr->tkwin, canvasTkwin);
}
+ Tcl_Release(canvas);
return;
}
Tk_CanvasWindowCoords(canvas, (double) winItemPtr->header.x1,
@@ -615,6 +619,7 @@ DisplayWinItem(
} else {
Tk_UnmaintainGeometry(winItemPtr->tkwin, canvasTkwin);
}
+ Tcl_Release(canvas);
return;
}
@@ -629,11 +634,16 @@ DisplayWinItem(
|| (height != Tk_Height(winItemPtr->tkwin))) {
Tk_MoveResizeWindow(winItemPtr->tkwin, x, y, width, height);
}
- Tk_MapWindow(winItemPtr->tkwin);
+
+ if (winItemPtr->tkwin) {
+ Tk_MapWindow(winItemPtr->tkwin);
+ }
+
} else {
Tk_MaintainGeometry(winItemPtr->tkwin, canvasTkwin, x, y,
width, height);
}
+ Tcl_Release(canvas);
}
/*