changeset 16366:b75f27a09a92

propagate from branch 'im.pidgin.pidgin' (head f20ceeff726ad3a9ee267225bb6e69f971d759bb) to branch 'im.pidgin.rlaager.gaim_migration' (head 8e12d08fc6cab69616f4792a0c2112ebd426b456)
author Richard Laager <rlaager@wiktel.com>
date Mon, 23 Apr 2007 17:00:08 +0000
parents 786edf5e2144 (current diff) b1c1b2319616 (diff)
children 6a9ae99e7050
files
diffstat 1 files changed, 10 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/prefs.c	Mon Apr 23 16:57:12 2007 +0000
+++ b/libpurple/prefs.c	Mon Apr 23 17:00:08 2007 +0000
@@ -92,7 +92,16 @@
 	if (name[1] == '\0')
 		return &prefs;
 	else
-		return g_hash_table_lookup(prefs_hash, name);
+	{
+		/* When we're initializing, the debug system is
+		 * initialized before the prefs system, but debug
+		 * calls will end up calling prefs functions, so we
+		 * need to deal cleanly here. */
+		if (prefs_hash)
+			return g_hash_table_lookup(prefs_hash, name);
+		else
+			return NULL;
+	}
 }