Merge lp:~phablet-team/media-hub/fix-1579953 into lp:media-hub

Proposed by Jim Hodapp
Status: Merged
Approved by: Alfonso Sanchez-Beato
Approved revision: 183
Merged at revision: 183
Proposed branch: lp:~phablet-team/media-hub/fix-1579953
Merge into: lp:media-hub
Diff against target: 14 lines (+5/-0)
1 file modified
src/core/media/service_skeleton.cpp (+5/-0)
To merge this branch: bzr merge lp:~phablet-team/media-hub/fix-1579953
Reviewer Review Type Date Requested Status
Alfonso Sanchez-Beato Approve
Simon Fels Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+294945@code.launchpad.net

Commit message

Make sure that is_current_player() doesn't crash when there isn't a current player pointer set.

Description of the change

Make sure that is_current_player() doesn't crash when there isn't a current player pointer set.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Simon Fels (morphis) wrote :

LGTM

review: Approve
Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/core/media/service_skeleton.cpp'
2--- src/core/media/service_skeleton.cpp 2016-05-03 18:06:41 +0000
3+++ src/core/media/service_skeleton.cpp 2016-05-17 17:52:46 +0000
4@@ -812,6 +812,11 @@
5 bool is_current_player(media::Player::PlayerKey key)
6
7 {
8+ if (not service_skel_config.player_store)
9+ return false;
10+ if (not service_skel_config.player_store->current_player().get())
11+ return false;
12+
13 return key == service_skel_config.player_store->current_player().get()->key();
14 }
15

Subscribers

People subscribed via source and target branches

to all changes: