libventi: handle rpc when not connected
R=rsc CC=plan9port.codebot http://codereview.appspot.com/5491051
This commit is contained in:
parent
d33a4d7f1b
commit
fc638f7bd4
@ -37,6 +37,12 @@ _vtrpc(VtConn *z, Packet *p, VtFcall *tx)
|
||||
uchar tag, buf[2], *top;
|
||||
Rwait *r, *rr;
|
||||
|
||||
if(z == nil){
|
||||
werrstr("not connected");
|
||||
packetfree(p);
|
||||
return nil;
|
||||
}
|
||||
|
||||
/* must malloc because stack could be private */
|
||||
r = vtmallocz(sizeof(Rwait));
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user