1
From: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>
2
Subject: Avoid crashing when receiving event for cards blueman shouldn't handle
3
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/precise/+source/blueman/+bug/962469
5
We'll run card_cb for every CHANGE or CARD event. Some of those may be for
6
changes to non-bluetooth device; in which case we don't need to handle them.
8
It's a little less efficient to do this in card_cb() than in on_pulse_event()
9
directly, but doing it this way makes for much clearer code as to what we're
10
trying to achieve exactly.
13
blueman/plugins/applet/PulseAudio.py | 4 ++++
14
1 file changed, 4 insertions(+)
16
Index: b/blueman/plugins/applet/PulseAudio.py
17
===================================================================
18
--- a/blueman/plugins/applet/PulseAudio.py
19
+++ b/blueman/plugins/applet/PulseAudio.py
20
@@ -210,6 +210,10 @@ class PulseAudio(AppletPlugin):
21
if (EventType.CARD | EventType.CHANGE) == event:
24
+ if "bluez.path" not in c["proplist"]:
25
+ # we're dealing with an event on a non-bluetooth device, we don't care
29
m = self.loaded_modules[c["proplist"]["bluez.path"]]
30
if c["owner_module"] == m.id: