diff src/audacious/pluginenum.c @ 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 7043b5c94a94
children 6aea4fb32ef4
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++;
         }