diff options
author | Tanu Kaskinen <tanu.kaskinen@linux.intel.com> | 2013-06-05 17:45:06 +0300 |
---|---|---|
committer | Tanu Kaskinen <tanu.kaskinen@linux.intel.com> | 2013-06-19 18:25:56 +0300 |
commit | e05c12f28b4bc8e4d7c5ba47f4bdb51243f9f252 (patch) | |
tree | d3056b767863b08339f26ec60a5887eb3bed00ea /src | |
parent | 0e9baa429ea2620dbb11f4b3a26eaa46620a9124 (diff) | |
download | pulseaudio-e05c12f28b4bc8e4d7c5ba47f4bdb51243f9f252.tar.gz |
bluetooth: Fix too late assertion
u was dereferenced before the assertion that checks that u isn't NULL.
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/bluetooth/module-bluetooth-device.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/modules/bluetooth/module-bluetooth-device.c b/src/modules/bluetooth/module-bluetooth-device.c index f82033aa2..a517e59d7 100644 --- a/src/modules/bluetooth/module-bluetooth-device.c +++ b/src/modules/bluetooth/module-bluetooth-device.c @@ -2233,11 +2233,13 @@ static int add_card(struct userdata *u) { pa_bt_form_factor_t ff; char *n; const char *default_profile; - const pa_bluetooth_device *device = u->device; + const pa_bluetooth_device *device; const pa_bluetooth_uuid *uuid; pa_assert(u); - pa_assert(device); + pa_assert(u->device); + + device = u->device; pa_card_new_data_init(&data); data.driver = __FILE__; |