# HG changeset patch # User Nathan Walp # Date 1053297314 0 # Node ID 07358c0674956b202820cb09fe9676d737361053 # Parent 702071b23c06540fb6e3aea9ab340bb2a04056f3 [gaim-migrate @ 5825] fix a segfault for solaris and others committer: Tailor Script diff -r 702071b23c06 -r 07358c067495 src/plugin.c --- a/src/plugin.c Sun May 18 22:00:53 2003 +0000 +++ b/src/plugin.c Sun May 18 22:35:14 2003 +0000 @@ -183,11 +183,13 @@ plugin = gaim_plugin_new(is_so_file(filename, PLUGIN_EXT), filename); if (plugin->native_plugin) { + char *error; plugin->handle = g_module_open(filename, 0); if (plugin->handle == NULL) { + error = g_module_error(); gaim_debug(GAIM_DEBUG_ERROR, "plugins", "%s is unloadable: %s\n", - plugin->path, g_module_error()); + plugin->path, error ? error : "Unknown error."); gaim_plugin_destroy(plugin); @@ -199,8 +201,9 @@ g_module_close(plugin->handle); plugin->handle = NULL; + error = g_module_error(); gaim_debug(GAIM_DEBUG_ERROR, "plugins", "%s is unloadable: %s\n", - plugin->path, g_module_error()); + plugin->path, error ? error : "Unknown error."); gaim_plugin_destroy(plugin);