summaryrefslogtreecommitdiffstats
path: root/generic/tkCanvWind.c
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2022-03-19 23:35:47 (GMT)
committerfvogel <fvogelnew1@free.fr>2022-03-19 23:35:47 (GMT)
commit2ef21d2a470c323fd6ece255ba9213f3c4d156d0 (patch)
tree21e9a86578140c084402bf15d64cfbbcd833529b /generic/tkCanvWind.c
parent151ab3e6c1878832aac01e2c843d6771c2052901 (diff)
parent3160bd7447d371ee375d1a75a71d9beb945c1f62 (diff)
downloadtk-2ef21d2a470c323fd6ece255ba9213f3c4d156d0.zip
tk-2ef21d2a470c323fd6ece255ba9213f3c4d156d0.tar.gz
tk-2ef21d2a470c323fd6ece255ba9213f3c4d156d0.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 4047b0f..a041589 100644
--- a/generic/tkCanvWind.c
+++ b/generic/tkCanvWind.c
@@ -571,6 +571,9 @@ DisplayWinItem(
if (winItemPtr->tkwin == NULL) {
return;
}
+
+ Tcl_Preserve(canvas);
+
if (state == TK_STATE_NULL) {
state = Canvas(canvas)->canvas_state;
}
@@ -585,6 +588,7 @@ DisplayWinItem(
} else {
Tk_UnmaintainGeometry(winItemPtr->tkwin, canvasTkwin);
}
+ Tcl_Release(canvas);
return;
}
Tk_CanvasWindowCoords(canvas, (double) winItemPtr->header.x1,
@@ -606,6 +610,7 @@ DisplayWinItem(
} else {
Tk_UnmaintainGeometry(winItemPtr->tkwin, canvasTkwin);
}
+ Tcl_Release(canvas);
return;
}
@@ -620,11 +625,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);
}
/*