[rhythmbox] shell: stop playback if the active source is deleted (bug #482955)



commit 0a6c00934d0d29a701470361734e12b70813f968
Author: Jonathan Matthew <jonathan d14n org>
Date:   Sat Mar 13 18:53:30 2010 +1000

    shell: stop playback if the active source is deleted (bug #482955)
    
    'active' here means the source the user selected for playback,
    whether it's actually playing or preempted by the play queue.
    This stops us crashing because the shell player has a reference
    to a nonexistant source when we try to move to the next track.

 shell/rb-shell.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/shell/rb-shell.c b/shell/rb-shell.c
index 5906186..37bc2e0 100644
--- a/shell/rb-shell.c
+++ b/shell/rb-shell.c
@@ -1819,7 +1819,8 @@ rb_shell_source_deleted_cb (RBSource *source,
 	g_boxed_free (RHYTHMDB_TYPE_ENTRY_TYPE, entry_type);
 
 
-	if (source == rb_shell_player_get_playing_source (shell->priv->player_shell)) {
+	if (source == rb_shell_player_get_playing_source (shell->priv->player_shell) ||
+	    source == rb_shell_player_get_active_source (shell->priv->player_shell)) {
 		rb_shell_player_stop (shell->priv->player_shell);
 	}
 	if (source == shell->priv->selected_source) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]