# HG changeset patch # User Matti Hamalainen # Date 1206472576 -7200 # Node ID 20418bdce63791ebe85475bb2e3978033de25175 # Parent 8ca25aee503724a9afe0dc692553fa8b9a89d001 Fixed a segfault when trying to open fileinfo window while no file is effectively selected (e.g. when playlist is empty, for example). Patch adapted from bugzilla #216 from Federico Schwindt. diff -r 8ca25aee5037 -r 20418bdce637 src/audacious/playlist.c --- a/src/audacious/playlist.c Tue Mar 25 21:02:13 2008 +0200 +++ b/src/audacious/playlist.c Tue Mar 25 21:16:16 2008 +0200 @@ -2495,8 +2495,10 @@ PLAYLIST_UNLOCK(playlist); - if (playlist->position->decoder != NULL && playlist->position->decoder->update_song_tuple != NULL && - playlist->position->decoder->file_info_box == NULL && path != NULL && !vfs_is_remote(path)) { + if (playlist->position != NULL && playlist->position->decoder != NULL && + playlist->position->decoder->update_song_tuple != NULL && + playlist->position->decoder->file_info_box == NULL && path != NULL && + !vfs_is_remote(path)) { fileinfo_show_editor_for_path(path, playlist->position->decoder); g_free(path);