diff src/paranormal/plugin.c @ 312:b223e71e7024 trunk

[svn] Allow modyfing configuration before loading Paranormal, without crashing.
author jerome
date Sun, 26 Nov 2006 19:47:44 -0800
parents a1be19f8de1f
children 1d7a52dbcd14
line wrap: on
line diff
--- a/src/paranormal/plugin.c	Sun Nov 26 11:45:22 2006 -0800
+++ b/src/paranormal/plugin.c	Sun Nov 26 19:47:44 2006 -0800
@@ -199,7 +199,8 @@
 pn_xmms_init (void)
 {
   /* If it isn't already loaded, load the run control */
-  load_pn_rc ();
+  if (! pn_rc)
+	  load_pn_rc ();
 
   sound_data_mutex = SDL_CreateMutex ();
   config_mutex = SDL_CreateMutex ();
@@ -293,6 +294,9 @@
   if (config_mutex)
     SDL_mutexP (config_mutex);
 
+  if (! pn_rc)
+	  load_pn_rc ();
+
   pn_configure ();
 
   if (config_mutex)
@@ -325,6 +329,9 @@
   if (config_mutex)
     SDL_mutexP (config_mutex);
 
+  if (! pn_rc)
+    load_pn_rc ();
+
   if (pn_rc->actuator)
     destroy_actuator (pn_rc->actuator);
   pn_rc->actuator = new_rc->actuator;