summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2009-06-25 13:52:15 +0100
committerBastien Nocera <hadess@hadess.net>2009-06-25 13:52:15 +0100
commit41c88f5b949fc8086b65250b59403fe2d9951bb9 (patch)
tree73dcc75ad7f0063d6f711789c6d1bbe31b9baa48
parent256c83d33ce4de9792fac5dacbd02ac63d068863 (diff)
downloadgnome-bluetooth-41c88f5b949fc8086b65250b59403fe2d9951bb9.tar.gz
Don't try to get a pincode when there's no device selected
When we lose the devices, the selection goes to NULL, thus, we can't have a pin for it.
-rw-r--r--wizard/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/wizard/main.c b/wizard/main.c
index 849a28f9..44cbddf8 100644
--- a/wizard/main.c
+++ b/wizard/main.c
@@ -777,7 +777,7 @@ select_device_changed (BluetoothChooser *selector,
if (user_pincode != NULL && *user_pincode != '\0') {
pincode = g_strdup (user_pincode);
automatic_pincode = TRUE;
- } else {
+ } else if (address != NULL) {
guint max_digits;
pincode = get_pincode_for_device(target_type, target_address, target_name, &max_digits);