--- xmms_osd.c.orig 2002-04-20 22:37:40.000000000 -0600 +++ xmms_osd.c 2002-04-20 22:56:52.000000000 -0600 @@ -16,6 +16,11 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +/* Updates (c) 2002 Stacey Keast (slik@telusplanet.net) + * make global variables static - prevents SIGSEGV + * NULL colour and font variables - prevents crashes when restarting + * pluggin, if it was already running (static variables aren't cleared) + */ #include @@ -51,18 +56,18 @@ cleanup, }; -xosd *osd; -guint timeout_tag; -int previous_song, previous_length, previous_volume, previous_balance; -gboolean previous_playing, previous_paused, previous_repeat, previous_shuffle; -gchar *font; -gchar *colour; -gint timeout; -gint offset; -gint shadow_offset; -gint pos; -GtkObject *timeout_obj, *offset_obj, *shadow_obj; -GtkWidget *configure_win, *font_entry, *colour_entry, +static xosd *osd; +static guint timeout_tag; +static int previous_song, previous_length, previous_volume, previous_balance; +static gboolean previous_playing, previous_paused, previous_repeat, previous_shuffle; +static gchar *font; +static gchar *colour; +static gint timeout; +static gint offset; +static gint shadow_offset; +static gint pos; +static GtkObject *timeout_obj, *offset_obj, *shadow_obj; +static GtkWidget *configure_win, *font_entry, *colour_entry, *timeout_spin, *offset_spin, *pos_top, *pos_bottom, *shadow_spin; GeneralPlugin *get_gplugin_info(void) @@ -98,9 +103,11 @@ if (font) g_free (font); + font=NULL; if (colour) g_free (colour); + colour=NULL; xosd_uninit (osd); }