ref: 9888ead0425a9acc90853cd865b3a131534544fe
parent: 0c4d5b8b07088ca818e786d08f0ae54a6c1d60df
author: cinap_lenrek <[email protected]>
date: Fri Jan 25 09:19:18 EST 2013
libventi: handle nil connection in rpc as error instead of crashing (from sources)
--- a/sys/src/libventi/rpc.c
+++ b/sys/src/libventi/rpc.c
@@ -37,6 +37,13 @@
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));