changeset 2549:f6efe94f2793

Fix uninitialied GtkWidget variable in about box creation.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 08 May 2008 21:51:47 +0300
parents 6d17b2c838df
children 6fdb69f0f169
files src/sndfile/plugin.c
diffstat 1 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/sndfile/plugin.c	Wed Apr 30 14:37:27 2008 +0300
+++ b/src/sndfile/plugin.c	Thu May 08 21:51:47 2008 +0300
@@ -539,12 +539,13 @@
     return TRUE;
 }
 
+static GtkWidget *sndfile_about_box = NULL;
+
 static void plugin_about(void)
 {
-    static GtkWidget *box;
-    if (!box)
+    if (!sndfile_about_box)
     {
-        box = audacious_info_dialog(_("About sndfile plugin"),
+        sndfile_about_box = audacious_info_dialog(_("About sndfile plugin"),
                                     _("Adapted for Audacious usage by Tony Vroon <chainsaw@gentoo.org>\n"
                                       "from the xmms_sndfile plugin which is:\n"
                                       "Copyright (C) 2000, 2002 Erik de Castro Lopo\n\n"
@@ -562,8 +563,8 @@
                                       "51 Franklin Street, Fifth Floor, \n"
                                       "Boston, MA  02110-1301  USA"),
                                     _("Ok"), FALSE, NULL, NULL);
-        g_signal_connect(G_OBJECT(box), "destroy",
-                         (GCallback)gtk_widget_destroyed, &box);
+        g_signal_connect(G_OBJECT(sndfile_about_box), "destroy",
+                         (GCallback)gtk_widget_destroyed, &sndfile_about_box);
     }
 }