diff options
| author | jpathy <jpathy@mail.nanosouffle.net> | 2013-09-24 15:50:35 -0700 |
|---|---|---|
| committer | jpathy <jpathy@mail.nanosouffle.net> | 2013-09-24 15:50:35 -0700 |
| commit | cafcffb1dce89b7e10ddd9149e4b0928ac2b9b38 (patch) | |
| tree | 47bb9bbb275bad69229a957d411e6ba1db4361e5 | |
| parent | 62b3eea2715a9e67cdb0873faa0d802344bf7683 (diff) | |
| download | plan9front-cafcffb1dce89b7e10ddd9149e4b0928ac2b9b38.tar.xz | |
fix null dereference crash in mothra
| -rw-r--r-- | sys/src/cmd/mothra/mothra.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/src/cmd/mothra/mothra.c b/sys/src/cmd/mothra/mothra.c index c6457f547..29e9219fd 100644 --- a/sys/src/cmd/mothra/mothra.c +++ b/sys/src/cmd/mothra/mothra.c @@ -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); |
