diff options
author | Jacob Moody <moody@posixcafe.org> | 2022-09-11 03:38:55 +0000 |
---|---|---|
committer | Jacob Moody <moody@posixcafe.org> | 2022-09-11 03:38:55 +0000 |
commit | 19162849bd5986f01034f04172f52386d7e961b2 (patch) | |
tree | c8e606df0e6dd6eb6173d204db9433dcda71bd8a | |
parent | 87160cbfcf926fd0a9f04e8113a16c2a0c7e252d (diff) |
rio: more pointy edges with none attach
Would crash when reading from wctl in riostart.
-rw-r--r-- | sys/src/cmd/rio/xfid.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/src/cmd/rio/xfid.c b/sys/src/cmd/rio/xfid.c index 0477e0200..a22101ed4 100644 --- a/sys/src/cmd/rio/xfid.c +++ b/sys/src/cmd/rio/xfid.c @@ -293,7 +293,7 @@ xfidopen(Xfid *x) ntsnarf = 0; break; case Qwctl: - if(x->mode==OREAD || x->mode==ORDWR){ + if(w != nil && (x->mode==OREAD || x->mode==ORDWR)){ /* * It would be much nicer to implement fan-out for wctl reads, * so multiple people can see the resizings, but rio just isn't @@ -365,7 +365,7 @@ xfidclose(Xfid *x) } break; case Qwctl: - if(x->f->mode==OREAD || x->f->mode==ORDWR) + if(w != nil && (x->f->mode==OREAD || x->f->mode==ORDWR)) w->wctlopen = FALSE; break; case Qtap: |