changeset 3454:c0eb377bb4e5 trunk

Check pointer to prevent NULL dereference.
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 08 Sep 2007 02:55:28 +0300
parents fb270cb264d7
children b0809bc9c618 b413aa0c939c
files src/audacious/pluginenum.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/audacious/pluginenum.c	Sat Sep 08 02:30:38 2007 +0300
+++ b/src/audacious/pluginenum.c	Sat Sep 08 02:55:28 2007 +0300
@@ -521,7 +521,9 @@
         disabled = g_strsplit(cfg.disabled_iplugins, ":", 0);
 
         while (disabled[i]) {
-            INPUT_PLUGIN(plugin_get_plugin(disabled[i]))->enabled = FALSE;
+            Plugin *plugintmp = plugin_get_plugin(disabled[i]);
+            if (plugintmp)
+                INPUT_PLUGIN(plugintmp)->enabled = FALSE;
             i++;
         }