diff options
Diffstat (limited to 'apps/playlist_viewer.c')
-rw-r--r-- | apps/playlist_viewer.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/apps/playlist_viewer.c b/apps/playlist_viewer.c index 4e3d8bade2..4328a6de1d 100644 --- a/apps/playlist_viewer.c +++ b/apps/playlist_viewer.c @@ -119,6 +119,7 @@ static struct playlist_viewer viewer; /* Used when viewing playlists on disk */ static struct playlist_info temp_playlist; +static bool temp_playlist_init = false; static bool dirty = false; @@ -365,6 +366,14 @@ static bool playlist_viewer_init(struct playlist_viewer * viewer, char *index_buffer = NULL; ssize_t index_buffer_size = 0; + /* Initialize temp playlist + * TODO - move this to playlist.c */ + if (!temp_playlist_init) + { + mutex_init(&temp_playlist.mutex); + temp_playlist_init = true; + } + viewer->playlist = &temp_playlist; /* Separate directory from filename */ |