summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2015-03-24 03:23:05 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2015-03-24 03:23:05 +0100
commit14a991a1ced945db09e53a1e6dd0a7b2a052cfba (patch)
tree04cd5744c9a2461647e008b7d025117865ec9468 /src
parentfcf4af33122850cdbd89493e40724061a7ffde06 (diff)
downloadfastd-14a991a1ced945db09e53a1e6dd0a7b2a052cfba.tar
fastd-14a991a1ced945db09e53a1e6dd0a7b2a052cfba.zip
peer: fix segfault on on-connect with unknown peer
Diffstat (limited to 'src')
-rw-r--r--src/peer.c2
1 files changed, 1 insertions, 1 deletions
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: