fix null dereference crash in mothra

This commit is contained in:
jpathy 2013-09-24 15:50:35 -07:00
parent 62b3eea271
commit cafcffb1dc

View file

@ -1016,9 +1016,11 @@ mothon(Www *w, int on)
plrtstr(&t->next, 0, 0, t->font, strdup("->"), PL_HOT, ap);
t->next->next = x;
} else {
t->next = x->next;
x->next = nil;
freetext(x);
if(x) {
t->next = x->next;
x->next = nil;
freetext(x);
}
}
}
updtext(w);