]> err.no Git - mapper/commitdiff
Check that GPS MAC address is set
authorKaj-Michael Lang <milang@angel.tal.org>
Fri, 19 Oct 2007 13:28:33 +0000 (16:28 +0300)
committerKaj-Michael Lang <milang@angel.tal.org>
Fri, 19 Oct 2007 13:28:33 +0000 (16:28 +0300)
src/bt-bluez.c
src/ui-common.c

index 2ca1345a126bd2cfb0019b99154fc0991c1f3838..f1cd511090093c65a4ef58740806109ab5e1d214 100644 (file)
@@ -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);
index ced30c0d1e3b206e44cfe8d0e3a93289c46e013e..b426471da5ffabb3f032855937edbdf8393b680b 100644 (file)
@@ -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... */