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
1=== modified file 'src/Widgets/MprisGui.vala'
2--- src/Widgets/MprisGui.vala 2016-10-23 14:43:54 +0000
3+++ src/Widgets/MprisGui.vala 2016-11-06 15:12:01 +0000
4@@ -72,7 +72,7 @@
5 } set {
6 this.client_ = value;
7 if (value != null) {
8- if (client.player.desktop_entry != "") {
9+ if (client.player.desktop_entry != null && client.player.desktop_entry != "") {
10 app_info = new DesktopAppInfo (client.player.desktop_entry + ".desktop");
11 }
12

Subscribers

People subscribed via source and target branches

to all changes: