diff --git a/apps/playlist.c b/apps/playlist.c index b004d46b40..c818937677 100644 --- a/apps/playlist.c +++ b/apps/playlist.c @@ -3159,7 +3159,6 @@ int playlist_resume(void) struct playlist_info* playlist = ¤t_playlist; dc_thread_stop(playlist); - playlist_write_lock(playlist); if (core_allocatable() < (1 << 10)) talk_buffer_set_policy(TALK_BUFFER_LOOSE); /* back off voice buffer */ @@ -3172,9 +3171,11 @@ int playlist_resume(void) if (handle < 0) { splashf(HZ * 2, "%s(): OOM", __func__); - goto out; + return -1; } + playlist_write_lock(playlist); + /* align buffer for faster load times */ buffer = core_get_data(handle); STORAGE_ALIGN_BUFFER(buffer, buflen);