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; | |||
119 | 119 | ||
120 | /* Used when viewing playlists on disk */ | 120 | /* Used when viewing playlists on disk */ |
121 | static struct playlist_info temp_playlist; | 121 | static struct playlist_info temp_playlist; |
122 | static bool temp_playlist_init = false; | ||
122 | 123 | ||
123 | static bool dirty = false; | 124 | static bool dirty = false; |
124 | 125 | ||
@@ -365,6 +366,14 @@ static bool playlist_viewer_init(struct playlist_viewer * viewer, | |||
365 | char *index_buffer = NULL; | 366 | char *index_buffer = NULL; |
366 | ssize_t index_buffer_size = 0; | 367 | ssize_t index_buffer_size = 0; |
367 | 368 | ||
369 | /* Initialize temp playlist | ||
370 | * TODO - move this to playlist.c */ | ||
371 | if (!temp_playlist_init) | ||
372 | { | ||
373 | mutex_init(&temp_playlist.mutex); | ||
374 | temp_playlist_init = true; | ||
375 | } | ||
376 | |||
368 | viewer->playlist = &temp_playlist; | 377 | viewer->playlist = &temp_playlist; |
369 | 378 | ||
370 | /* Separate directory from filename */ | 379 | /* Separate directory from filename */ |