comparison libpurple/core.c @ 23580:fae54e746bde

Initialize the commands subsystem before the plugins. This is necessary because plugins can add commands, and if the commands subsystem isn't initialized by then, it throws a runtime error, causing a crash with G_DEBUG=fatal_warnings (and from make check too, it seems). Thanks to Richard for finding the bug.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Sun, 13 Jul 2008 15:51:38 +0000
parents b5f679e95666
children 2ecd716746e6 a29ae9a5c311
comparison
equal deleted inserted replaced
23579:0e54d1fea7e2 23580:fae54e746bde
129 #ifdef HAVE_DBUS 129 #ifdef HAVE_DBUS
130 purple_dbus_init(); 130 purple_dbus_init();
131 #endif 131 #endif
132 132
133 purple_ciphers_init(); 133 purple_ciphers_init();
134 purple_cmds_init();
134 135
135 /* Since plugins get probed so early we should probably initialize their 136 /* Since plugins get probed so early we should probably initialize their
136 * subsystem right away too. 137 * subsystem right away too.
137 */ 138 */
138 purple_plugins_init(); 139 purple_plugins_init();
168 purple_ssl_init(); 169 purple_ssl_init();
169 purple_stun_init(); 170 purple_stun_init();
170 purple_xfers_init(); 171 purple_xfers_init();
171 purple_idle_init(); 172 purple_idle_init();
172 purple_smileys_init(); 173 purple_smileys_init();
173 purple_cmds_init();
174 174
175 /* 175 /*
176 * Call this early on to try to auto-detect our IP address and 176 * Call this early on to try to auto-detect our IP address and
177 * hopefully save some time later. 177 * hopefully save some time later.
178 */ 178 */
197 197
198 /* Transmission ends */ 198 /* Transmission ends */
199 purple_connections_disconnect_all(); 199 purple_connections_disconnect_all();
200 200
201 /* Save .xml files, remove signals, etc. */ 201 /* Save .xml files, remove signals, etc. */
202 purple_cmds_uninit();
203 purple_smileys_uninit(); 202 purple_smileys_uninit();
204 purple_idle_uninit(); 203 purple_idle_uninit();
205 purple_ssl_uninit(); 204 purple_ssl_uninit();
206 purple_pounces_uninit(); 205 purple_pounces_uninit();
207 purple_blist_uninit(); 206 purple_blist_uninit();
231 purple_plugins_uninit(); 230 purple_plugins_uninit();
232 #ifdef HAVE_DBUS 231 #ifdef HAVE_DBUS
233 purple_dbus_uninit(); 232 purple_dbus_uninit();
234 #endif 233 #endif
235 234
235 purple_cmds_uninit();
236 purple_util_uninit(); 236 purple_util_uninit();
237 237
238 purple_signals_uninit(); 238 purple_signals_uninit();
239 239
240 g_free(core->ui); 240 g_free(core->ui);