libventi: handle nil connection in rpc as error instead of crashing (from sources)
parent
0c4d5b8b07
commit
9888ead042
|
@ -37,6 +37,13 @@ _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