Only clear the spoiled flag if the class had no spoiled method, the spoiled

method may have deallocated the consumer already and modifying free()'ed
memory is bad style.

Sponsored by: DARPA & NAI Labs.
This commit is contained in:
Poul-Henning Kamp 2002-05-26 17:17:25 +00:00
parent 8881422a08
commit 855f8b26f2

View File

@ -191,7 +191,8 @@ g_do_event(struct g_event *ep)
cp, cp->geom->name, cp->geom->spoiled);
if (cp->geom->spoiled != NULL)
cp->geom->spoiled(cp);
cp->spoiled = 0;
else
cp->spoiled = 0;
}
cp = cp2;
}