ref: e2f0a0cc2d63da2daf98e94256278a4b894934f7
parent: 8f63d48a00251d74b67e7244c908e436cb540d2c
author: jpathy <jpathy@mail.nanosouffle.net>
date: Tue Sep 24 11:50:35 EDT 2013
fix null dereference crash in mothra
--- a/sys/src/cmd/mothra/mothra.c
+++ b/sys/src/cmd/mothra/mothra.c
@@ -1016,9 +1016,11 @@
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);
--
⑨