comparison libpurple/prefs.c @ 16342:b1c1b2319616

When initializing, the debug system is initialized before the prefs system, but debug calls will end up calling prefs functions, so we need to deal with that situation cleanly. I noticed this when using the debug functions in the core migration code.
author Richard Laager <rlaager@wiktel.com>
date Mon, 23 Apr 2007 16:59:37 +0000
parents f1c2ff731fd9
children 4999bbc52881
comparison
equal deleted inserted replaced
16326:08557e94840c 16342:b1c1b2319616
90 g_return_val_if_fail(name != NULL && name[0] == '/', NULL); 90 g_return_val_if_fail(name != NULL && name[0] == '/', NULL);
91 91
92 if (name[1] == '\0') 92 if (name[1] == '\0')
93 return &prefs; 93 return &prefs;
94 else 94 else
95 return g_hash_table_lookup(prefs_hash, name); 95 {
96 /* When we're initializing, the debug system is
97 * initialized before the prefs system, but debug
98 * calls will end up calling prefs functions, so we
99 * need to deal cleanly here. */
100 if (prefs_hash)
101 return g_hash_table_lookup(prefs_hash, name);
102 else
103 return NULL;
104 }
96 } 105 }
97 106
98 107
99 /********************************************************************* 108 /*********************************************************************
100 * Writing to disk * 109 * Writing to disk *