changeset 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 ccf3e141fb1e
children b189991f7417
files ChangeLog src/audacious/build_stamp.c src/audacious/main.c src/audacious/playlist.c
diffstat 4 files changed, 14 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri May 11 12:35:52 2007 -0700
+++ b/ChangeLog	Fri May 11 12:39:47 2007 -0700
@@ -1,3 +1,11 @@
+2007-05-11 19:35:52 +0000  William Pitcock <nenolod@sacredspiral.co.uk>
+  revision [4496]
+  - finish some stubs to make audtool work for my scripts
+  
+  trunk/src/libaudclient/audctrl.c |   12 ++++++++++++
+  1 file changed, 12 insertions(+)
+
+
 2007-05-11 19:22:38 +0000  William Pitcock <nenolod@sacredspiral.co.uk>
   revision [4494]
   - BSDify code
--- a/src/audacious/build_stamp.c	Fri May 11 12:35:52 2007 -0700
+++ b/src/audacious/build_stamp.c	Fri May 11 12:39:47 2007 -0700
@@ -1,2 +1,2 @@
 #include <glib.h>
-const gchar *svn_stamp = "20070511-4494";
+const gchar *svn_stamp = "20070511-4496";
--- a/src/audacious/main.c	Fri May 11 12:35:52 2007 -0700
+++ b/src/audacious/main.c	Fri May 11 12:39:47 2007 -0700
@@ -1138,10 +1138,7 @@
 
     bmp_config_load();
 
-    if (options.session != -1) {
-        handle_cmd_line_options(&options, TRUE);
-        exit(EXIT_SUCCESS);
-    }
+    handle_cmd_line_options(&options, TRUE);
 
 #ifdef USE_DBUS
     init_dbus();
--- 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