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
=== modified file 'src/core/media/service_skeleton.cpp'
--- src/core/media/service_skeleton.cpp 2016-05-03 18:06:41 +0000
+++ src/core/media/service_skeleton.cpp 2016-05-17 17:52:46 +0000
@@ -812,6 +812,11 @@
812 bool is_current_player(media::Player::PlayerKey key)812 bool is_current_player(media::Player::PlayerKey key)
813813
814 {814 {
815 if (not service_skel_config.player_store)
816 return false;
817 if (not service_skel_config.player_store->current_player().get())
818 return false;
819
815 return key == service_skel_config.player_store->current_player().get()->key();820 return key == service_skel_config.player_store->current_player().get()->key();
816 }821 }
817822

Subscribers

People subscribed via source and target branches

to all changes: