changeset 7040:ccadd1da839b

[gaim-migrate @ 7603] This should fix a crash on unload of the SSL plugin under certain conditions. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Mon, 29 Sep 2003 23:55:27 +0000
parents 9f2285b667a7
children a671a28bc50b
files plugins/ssl/ssl.c
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/ssl/ssl.c	Mon Sep 29 23:47:35 2003 +0000
+++ b/plugins/ssl/ssl.c	Mon Sep 29 23:55:27 2003 +0000
@@ -67,12 +67,13 @@
 static gboolean
 plugin_unload(GaimPlugin *plugin)
 {
-	if (ssl_plugin != NULL)
+	if (ssl_plugin != NULL &&
+		g_list_find(gaim_plugins_get_loaded(), plugin) != NULL)
 	{
 		gaim_plugin_unload(ssl_plugin);
+	}
 
-		ssl_plugin = NULL;
-	}
+	ssl_plugin = NULL;
 
 	return TRUE;
 }