changeset 32517:5e085a727f4e

gtkdisco: Prevent a NULL dereference crash
author Paul Aurich <paul@darkrain42.org>
date Wed, 15 Feb 2012 22:26:40 +0000
parents c0c60e110c82
children 0087049160ad
files pidgin/plugins/disco/gtkdisco.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/plugins/disco/gtkdisco.c	Tue Dec 13 15:24:16 2011 +0000
+++ b/pidgin/plugins/disco/gtkdisco.c	Wed Feb 15 22:26:40 2012 +0000
@@ -462,6 +462,8 @@
 	gtk_tree_model_get_value(GTK_TREE_MODEL(pdl->model), &iter, SERVICE_COLUMN,
 	                         &val);
 	service = g_value_get_pointer(&val);
+	if (!service)
+		return FALSE;
 
 	switch (service->type) {
 		case XMPP_DISCO_SERVICE_TYPE_UNSET: