From 14a991a1ced945db09e53a1e6dd0a7b2a052cfba Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Tue, 24 Mar 2015 03:23:05 +0100 Subject: peer: fix segfault on on-connect with unknown peer --- src/peer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/peer.c b/src/peer.c index 79a4588..b174b9b 100644 --- a/src/peer.c +++ b/src/peer.c @@ -44,7 +44,7 @@ void fastd_peer_set_shell_env(fastd_shell_env_t *env, const fastd_peer_t *peer, fastd_shell_env_set(env, "PEER_NAME", peer ? peer->name : NULL); - fastd_shell_env_set_iface(env, peer->iface); + fastd_shell_env_set_iface(env, peer ? peer->iface : NULL); switch(local_addr ? local_addr->sa.sa_family : AF_UNSPEC) { case AF_INET: -- cgit v1.2.3