diff src/audacious/playlist.c @ 2736:8249a1248a09 trunk

[svn] - avoid null dereferences - handle command line options before plugin system is loaded
author nenolod
date Fri, 11 May 2007 12:39:47 -0700
parents 6884a2144a01
children 63fbbe9775a6
line wrap: on
line diff
--- a/src/audacious/playlist.c	Fri May 11 12:35:52 2007 -0700
+++ b/src/audacious/playlist.c	Fri May 11 12:39:47 2007 -0700
@@ -3140,7 +3140,10 @@
     if (playlists_iter != NULL)
         return (Playlist *) playlists_iter->data;
 
-    return (Playlist *) playlists->data;
+    if (playlists)
+        return (Playlist *) playlists->data;
+
+    return NULL;
 }
 
 void