]> git.meshlink.io Git - utcp/blobdiff - utcp.c
Fix a segfault when debugging is enabled.
[utcp] / utcp.c
diff --git a/utcp.c b/utcp.c
index d846fb1965bd4384bef7239ae0781e08fb257d8f..e347bb7165209b284409c6f92fca724993c05c04 100644 (file)
--- a/utcp.c
+++ b/utcp.c
@@ -988,7 +988,7 @@ reset:
 }
 
 int utcp_shutdown(struct utcp_connection *c, int dir) {
-       debug("%p shutdown %d at %u\n", c ? c->utcp : NULL, dir, c->snd.last);
+       debug("%p shutdown %d at %u\n", c ? c->utcp : NULL, dir, c ? c->snd.last : 0);
        if(!c) {
                errno = EFAULT;
                return -1;