diff --git a/core/playlists/generic.c b/core/playlists/generic.c index 39317f10..156a1ab2 100644 --- a/core/playlists/generic.c +++ b/core/playlists/generic.c @@ -42,8 +42,10 @@ void playlist_generic_init(struct playlist *playlist) { if (playlist) { g_queue_init(&playlist->pl_tracks); - playlist->pl_sort = NULL; + playlist->pl_length = 0; + playlist->pl_random = false; playlist->pl_current = NULL; + playlist->pl_sort = NULL; playlist->pl_search = NULL; } } diff --git a/tests/core/playlists/user.c b/tests/core/playlists/user.c index f8d5435b..ae197bca 100644 --- a/tests/core/playlists/user.c +++ b/tests/core/playlists/user.c @@ -18,6 +18,8 @@ void test_user() playlist = playlist_new(PL_USER, "Test Playlist"); g_assert_nonnull(playlist); g_assert_cmpuint(playlist->pl_id, ==, 0); + g_assert_cmpuint(playlist->pl_length, ==, 0); + g_assert_false(playlist->pl_random); g_assert_null(playlist_new(PL_USER, "Test Playlist")); g_assert_cmpuint(db->db_size, ==, 1);