From cb70502fc952b1e0b816bb2971b37b3755627c01 Mon Sep 17 00:00:00 2001 From: Kaj-Michael Lang Date: Fri, 19 Oct 2007 16:28:33 +0300 Subject: [PATCH] Check that GPS MAC address is set --- src/bt-bluez.c | 3 +++ src/ui-common.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/bt-bluez.c b/src/bt-bluez.c index 2ca1345..f1cd511 100644 --- a/src/bt-bluez.c +++ b/src/bt-bluez.c @@ -154,6 +154,9 @@ if (_fd != -1) { gboolean rcvr_connect_now() { +if (!_rcvr_mac) + return FALSE; + _rcvr_addr.rc_family = AF_BLUETOOTH; _rcvr_addr.rc_channel = 1; str2ba(_rcvr_mac, &_rcvr_addr.rc_bdaddr); diff --git a/src/ui-common.c b/src/ui-common.c index ced30c0..b426471 100644 --- a/src/ui-common.c +++ b/src/ui-common.c @@ -410,7 +410,7 @@ if (!been_here++) { } } /* Connect to receiver. */ - if (_enable_gps) + if (_enable_gps && _rcvr_mac) rcvr_connect_now(); done_here++; /* Don't ask... */ -- 2.39.5