Index: src/window.c =================================================================== RCS file: /usr/CVSroot/XEmacs/xemacs/src/window.c,v retrieving revision 1.41.2.48 diff -u -r1.41.2.48 window.c --- src/window.c 2000/05/03 14:47:19 1.41.2.48 +++ src/window.c 2000/05/05 19:40:21 @@ -1875,7 +1875,13 @@ window_unmap_subwindows_cache_mapper (Lisp_Object key, Lisp_Object value, void *flag_closure) { + struct frame* f = XFRAME (XIMAGE_INSTANCE_FRAME (value)); unmap_subwindow (value); + /* In case GC doesn't catch up fast enough, remove from the frame + cache also. Otherwise code that checks the sanity of the instance + will fail. */ + XWEAK_LIST_LIST (FRAME_SUBWINDOW_CACHE (f)) + = delq_no_quit (value, XWEAK_LIST_LIST (FRAME_SUBWINDOW_CACHE (f))); return 0; }