changeset 3134:10c42e059460 trunk

prevent playback_get_time: assertion playback_get_playing() failed
author Tomasz Mon <desowin@gmail.com>
date Sat, 21 Jul 2007 10:04:29 +0200
parents 25f92bfd50c4
children 7cdcf8ab08da
files src/audacious/ui_fileinfopopup.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/audacious/ui_fileinfopopup.c	Fri Jul 20 20:59:15 2007 -0500
+++ b/src/audacious/ui_fileinfopopup.c	Sat Jul 21 10:04:29 2007 +0200
@@ -107,14 +107,14 @@
     pos = playlist_get_position(pl);
 
     current_file = playlist_get_filename(pl , pos);
-    time = playback_get_time();
 
     g_return_val_if_fail(current_file != NULL, FALSE);
 
-    if (time != -1 && length != -1 &&
+    if (playback_get_playing() && length != -1 &&
         current_file != NULL && tooltip_file != NULL &&
         !strcmp(tooltip_file, current_file) && cfg.filepopup_showprogressbar)
     {
+        time = playback_get_time();
         gchar *progress_time =
             g_strdup_printf("%d:%02d", time / 60000, (time / 1000) % 60);
         gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(progressbar),