MCStack *MCDispatch::findstackd(Window w) { if (w == DNULL) return NULL; if (stacks != NULL) { MCStack *tstk = stacks; do { MCStack *foundstk; if ((foundstk = tstk->findstackd(w)) != NULL) return foundstk; tstk = (MCStack *)tstk->next(); } while (tstk != stacks); } if (panels != NULL) { MCStack *tstk = panels; do { MCStack *foundstk; if ((foundstk = tstk->findstackd(w)) != NULL) return foundstk; tstk = (MCStack *)tstk->next(); } while (tstk != panels); } // MW-2006-04-24: [[ Purify ]] It is possible to get here after MCtooltip has been // deleted. So MCtooltip is now NULL in this situation and we test for it here. if (MCtooltip != NULL && MCtooltip->findstackd(w)) return MCtooltip; return NULL; }