Merge lp:~donadigo/wingpanel-indicator-sound/fix-g-str-hash-crash into lp:~wingpanel-devs/wingpanel-indicator-sound/trunk

Proposed by Adam Bieńkowski
Status: Merged
Approved by: Djax
Approved revision: 127
Merged at revision: 127
Proposed branch: lp:~donadigo/wingpanel-indicator-sound/fix-g-str-hash-crash
Merge into: lp:~wingpanel-devs/wingpanel-indicator-sound/trunk
Diff against target: 11 lines (+1/-1)
1 file modified
src/Widgets/MprisGui.vala (+1/-1)
To merge this branch: bzr merge lp:~donadigo/wingpanel-indicator-sound/fix-g-str-hash-crash
Reviewer Review Type Date Requested Status
WingPanel Devs Pending
Review via email: mp+310140@code.launchpad.net

Commit message

* Fix "g_str_hash" crash within DesktopAppInfo

Description of the change

Fixes crash within MprisClient where the desktop_entry would be null, adding ".desktop" string to null will result in a crash within "g_str_hash", this is now fixed with a simple check.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/Widgets/MprisGui.vala'
--- src/Widgets/MprisGui.vala 2016-10-23 14:43:54 +0000
+++ src/Widgets/MprisGui.vala 2016-11-06 15:12:01 +0000
@@ -72,7 +72,7 @@
72 } set {72 } set {
73 this.client_ = value;73 this.client_ = value;
74 if (value != null) {74 if (value != null) {
75 if (client.player.desktop_entry != "") {75 if (client.player.desktop_entry != null && client.player.desktop_entry != "") {
76 app_info = new DesktopAppInfo (client.player.desktop_entry + ".desktop");76 app_info = new DesktopAppInfo (client.player.desktop_entry + ".desktop");
77 }77 }
7878

Subscribers

People subscribed via source and target branches

to all changes: