[rhythmbox] shell-player: allow NULL arguments to rb_shell_player_get_playback_state



commit 5d27c9db33dfb6125f97dfc73c4e8d19d09089f3
Author: Jonathan Matthew <jonathan d14n org>
Date:   Fri Aug 13 20:55:05 2010 +1000

    shell-player: allow NULL arguments to rb_shell_player_get_playback_state

 shell/rb-shell-player.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/shell/rb-shell-player.c b/shell/rb-shell-player.c
index 95ef8ff..e5b32ee 100644
--- a/shell/rb-shell-player.c
+++ b/shell/rb-shell-player.c
@@ -1804,8 +1804,12 @@ rb_shell_player_get_playback_state (RBShellPlayer *player,
 	return FALSE;
 
 found:
-	*shuffle = i > 0;
-	*repeat = j > 0;
+	if (shuffle != NULL) {
+		*shuffle = i > 0;
+	}
+	if (repeat != NULL) {
+		*repeat = j > 0;
+	}
 	g_free (play_order);
 	return TRUE;
 }



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