changeset 27555:5345dfe48272

Don't assume a resolver generated the response. committer: Paul Aurich <paul@darkrain42.org>
author aman@tmm1.net
date Sat, 11 Jul 2009 21:53:52 +0000
parents 75ef7eab4978
children cbee8aecc90a 444542a43790
files libpurple/dnsquery.c
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/dnsquery.c	Sat Jul 11 21:44:14 2009 +0000
+++ b/libpurple/dnsquery.c	Sat Jul 11 21:53:52 2009 +0000
@@ -118,8 +118,11 @@
 	 * Add the resolver to the list of available resolvers, and set it
 	 * to NULL so that it doesn't get destroyed along with the query_data
 	 */
-	free_dns_children = g_slist_prepend(free_dns_children, query_data->resolver);
-	query_data->resolver = NULL;
+	if (query_data->resolver)
+	{
+		free_dns_children = g_slist_prepend(free_dns_children, query_data->resolver);
+		query_data->resolver = NULL;
+	}
 #endif /* PURPLE_DNSQUERY_USE_FORK */
 
 	purple_dnsquery_destroy(query_data);