summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2007-06-06 09:24:37 +0000
committerJohan Hedberg <johan.hedberg@nokia.com>2007-06-06 09:24:37 +0000
commit60e90bcc4d46b26ec056821f3024b08d364f1cc7 (patch)
tree6c7ce0cc7c58be27dc45f79337455046cdd4b2ae
parentfa8443140be92fdf58acdf98a31bb3a986576cbe (diff)
Another minor fix
-rw-r--r--audio/headset.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/audio/headset.c b/audio/headset.c
index b58aa903..5fc33c43 100644
--- a/audio/headset.c
+++ b/audio/headset.c
@@ -447,7 +447,7 @@ failed:
static gboolean rfcomm_connect_cb(GIOChannel *chan, GIOCondition cond,
audio_device_t *device)
{
- struct headset *hs = device->headset;
+ struct headset *hs;
char hs_address[18];
int sk, ret, err;
socklen_t len;
@@ -455,6 +455,8 @@ static gboolean rfcomm_connect_cb(GIOChannel *chan, GIOCondition cond,
if (cond & G_IO_NVAL)
return FALSE;
+ hs = device->headset;
+
assert(hs != NULL);
assert(hs->pending_connect != NULL);
assert(hs->rfcomm == NULL);