From 6946fe327145719cc59f026d151acf25c788297e Mon Sep 17 00:00:00 2001 From: Alexey Yakovenko Date: Thu, 24 Jun 2010 20:41:24 +0200 Subject: fixed crashes on accessing NULL playlist at startup --- playlist.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/playlist.c b/playlist.c index b24749ee..d156d8d3 100644 --- a/playlist.c +++ b/playlist.c @@ -91,8 +91,11 @@ static uintptr_t mutex_plt; #define GLOBAL_LOCK {pl_global_lock();} #define GLOBAL_UNLOCK {pl_global_unlock();} +static playlist_t dummy_playlist; // used at startup to prevent crashes + int pl_init (void) { + playlist = &dummy_playlist; #if !DISABLE_LOCKING mutex = mutex_create (); mutex_plt = mutex_create (); -- cgit v1.2.3