changeset 32505:e7a18e4a33ba

*** Plucked rev 081986627877141e126dc3bcd9b0ab5063e96e83 (darkrain42@pidgin.im): gtkdisco: Prevent a NULL dereference crash
author Paul Aurich <paul@darkrain42.org>
date Wed, 15 Feb 2012 22:29:29 +0000
parents 1c6d228d8ef9
children 0c2efa69492b
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	Wed Feb 15 09:49:00 2012 +0000
+++ b/pidgin/plugins/disco/gtkdisco.c	Wed Feb 15 22:29:29 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: