Artifact
4dce1e756c95868bd087aaf4ad7b76778ae715b757937a2158b2ff4f8dd975d0:
Attachment "tkImage2.diff" to
ticket [0beaefa4]
added by
emiliano
2026-06-18 19:54:24.
Index: generic/tkImage.c
==================================================================
--- generic/tkImage.c
+++ generic/tkImage.c
@@ -1041,10 +1041,16 @@
* to type information for image. */
{
TkWindow *winPtr = (TkWindow *) Tk_MainWindow(interp);
Tcl_HashEntry *hPtr;
ImageModel *modelPtr;
+
+ if (!winPtr) {
+ /* application has been destroyed */
+ *typePtrPtr = NULL;
+ return NULL;
+ }
hPtr = Tcl_FindHashEntry(&winPtr->mainPtr->imageTable, name);
if (hPtr == NULL) {
*typePtrPtr = NULL;
return NULL;