changeset 6560:aeb5ee62debc

[gaim-migrate @ 7082] (14:16:38) Robot101: I've got a nice patch to stop the ticker from crashing the 2nd time you load it committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Thu, 21 Aug 2003 18:20:05 +0000
parents 8dba07c335e9
children 33ceba0dfd9b
files plugins/ticker/gtkticker.c
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/ticker/gtkticker.c	Thu Aug 21 16:01:18 2003 +0000
+++ b/plugins/ticker/gtkticker.c	Thu Aug 21 18:20:05 2003 +0000
@@ -51,6 +51,8 @@
 {
 	static GType ticker_type = 0;
 
+	ticker_type = g_type_from_name("GtkTicker");
+
 	if (!ticker_type)
 	{
 		static const GTypeInfo ticker_info =
@@ -70,6 +72,11 @@
 				&ticker_info, 0);
 	}
 
+	/* kludge to re-initialise the class if it's already registered */
+	else if (parent_class == NULL) {
+		gtk_ticker_class_init((GtkTickerClass *)g_type_class_peek(ticker_type));
+	}
+
 	return ticker_type;
 }