Mercurial > audlegacy
changeset 3132:c5568d294a8a trunk
Handle non-probe-for-tuple functions without crashing.
author | William Pitcock <nenolod@atheme-project.org> |
---|---|
date | Fri, 20 Jul 2007 20:17:57 -0500 |
parents | dfe8f4eb3dba |
children | 25f92bfd50c4 |
files | src/audacious/playlist.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/audacious/playlist.c Fri Jul 20 20:09:08 2007 -0500 +++ b/src/audacious/playlist.c Fri Jul 20 20:17:57 2007 -0500 @@ -650,7 +650,7 @@ g_return_if_fail(playlist != NULL); g_return_if_fail(filename != NULL); - entry = playlist_entry_new(filename, tuple->track_name, tuple->length, dec); + entry = playlist_entry_new(filename, tuple ? tuple->track_name : NULL, tuple ? tuple->length : -1, dec); if(!playlist->tail) playlist->tail = g_list_last(playlist->entries); @@ -683,7 +683,7 @@ entry->tuple = tuple; } - if(tuple->mtime == -1) { // kick the scanner thread only if mtime = -1 (uninitialized). + if(tuple != NULL && tuple->mtime == -1) { // kick the scanner thread only if mtime = -1 (uninitialized). g_mutex_lock(mutex_scan); playlist_get_info_scan_active = TRUE; g_mutex_unlock(mutex_scan);