Tkined 1.4.1 odd code/bug

Jim Madden (jmadden@ucsd.edu)
Tue, 30 Jul 1996 14:45:39 -0700

The bit of code at scotty-2.1.1/tkined/generic/tkiFlash.c, line 111 that
looks like

#if 1
if (object->editor) {
char *buf = (object->flash % 2) ? "noicon" : "icon";
Tcl_VarEval(interp, "if ![winfo ismapped ", object->editor->toplevel,
"] {", "wm iconbitmap ", object->editor->toplevel, " ",
buf, "}", (char *) NULL);
}
#endif

Tcl_Eval (interp, "update");

if (max > 0) {
Tk_CreateTimerHandler (500, FlashProc, (ClientData) interp);
}

can cause a segmentation fault because object itself may be NULL. I've
made this happen consistently by deleting a flashing strip chart. I'm not
sure what the intent is in having this reference to object outside the loop
where "object" is set, so I can't propose a solution other than checking
that object is not null.

Jim Madden