comparison src/audacious/playlist.c @ 4737:2d69832b7136

Fix infinite playlist update when entry->tuple == NULL. Patch from Skotlex, closes Bugzilla #42.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 17 Jul 2008 21:59:39 +0300
parents ab79ddbdcf42
children 34e0d0de2018
comparison
equal deleted inserted replaced
4736:e14398ef0868 4737:2d69832b7136
2435 if (!playlist_entry_get_info(entry) && 2435 if (!playlist_entry_get_info(entry) &&
2436 g_list_index(playlist->entries, entry) == -1) 2436 g_list_index(playlist->entries, entry) == -1)
2437 /* Entry disappeared while we looked it up. 2437 /* Entry disappeared while we looked it up.
2438 Restart. */ 2438 Restart. */
2439 node = playlist->entries; 2439 node = playlist->entries;
2440 else if ((entry->tuple != NULL || entry->title != NULL) && 2440 else if (entry->tuple != NULL &&
2441 tuple_get_int(entry->tuple, FIELD_LENGTH, NULL) > -1 && 2441 tuple_get_int(entry->tuple, FIELD_LENGTH, NULL) > -1 &&
2442 tuple_get_int(entry->tuple, FIELD_MTIME, NULL) != -1) 2442 tuple_get_int(entry->tuple, FIELD_MTIME, NULL) != -1)
2443 { 2443 {
2444 update_playlistwin = TRUE; 2444 update_playlistwin = TRUE;
2445 break; /* hmmm... --asphyx */ 2445 break; /* hmmm... --asphyx */
2486 /* Entry disapeared while we 2486 /* Entry disapeared while we
2487 looked it up. Restart. */ 2487 looked it up. Restart. */
2488 node = g_list_nth(playlist->entries, 2488 node = g_list_nth(playlist->entries,
2489 playlistwin_get_toprow()); 2489 playlistwin_get_toprow());
2490 } 2490 }
2491 else if ((entry->tuple != NULL || entry->title != NULL) && 2491 else if (entry->tuple != NULL &&
2492 tuple_get_int(entry->tuple, FIELD_LENGTH, NULL) > -1 && 2492 tuple_get_int(entry->tuple, FIELD_LENGTH, NULL) > -1 &&
2493 tuple_get_int(entry->tuple, FIELD_MTIME, NULL) != -1) { 2493 tuple_get_int(entry->tuple, FIELD_MTIME, NULL) != -1) {
2494 update_playlistwin = TRUE; 2494 update_playlistwin = TRUE;
2495 } 2495 }
2496 } 2496 }