aboutsummaryrefslogtreecommitdiff
path: root/src/libventi/rpc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libventi/rpc.c')
-rw-r--r--src/libventi/rpc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libventi/rpc.c b/src/libventi/rpc.c
index 5a820a99..8f268633 100644
--- a/src/libventi/rpc.c
+++ b/src/libventi/rpc.c
@@ -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));