Skip to content

Commit

Permalink
PuseAudioManager: fix crash with non-app audio source (#280)
Browse files Browse the repository at this point in the history
Settings crashes when you have a Bluetooth audio player paired like for example a phone
  • Loading branch information
danirabbit authored Aug 25, 2024
1 parent c1bebd3 commit 62d97f9
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
10 changes: 10 additions & 0 deletions data/sound.metainfo.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,16 @@
<update_contact>contact_at_elementary.io</update_contact>

<releases>
<release version="8.0.1" date="2024-08-21" urgency="medium">
<description>
<p>Improvements:</p>
<ul>
<li>Fix crash when connecting bluetooth audio players</li>
<li>Updated translations</li>
</ul>
</description>
</release>

<release version="8.0.0" date="2024-07-26" urgency="medium">
<description>
<p>New Features:</p>
Expand Down
8 changes: 8 additions & 0 deletions src/PulseAudioManager.vala
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,14 @@ public class Sound.PulseAudioManager : GLib.Object {
return;
}

// Can't construct an app object
if (
sink_input.proplist.contains (PulseAudio.Proplist.PROP_APPLICATION_ID) == 0 ||
sink_input.proplist.contains (PulseAudio.Proplist.PROP_APPLICATION_NAME) == 0
) {
return;
}

App? app = null;
for (uint i = 0; i < apps.get_n_items (); i++) {
var _app = (App) apps.get_item (i);
Expand Down

0 comments on commit 62d97f9

Please sign in to comment.