changeset 26646:d06af7664a7a

merge of '6a70c2c1325aeb644bff8476f94c5a25f83044fb' and 'd5a487de6cafd4f773a3cc1b9b08d6081771e9de'
author Marcus Lundblad <ml@update.uu.se>
date Wed, 22 Apr 2009 18:37:31 +0000
parents 474a0cb44f58 (current diff) 7be72613e9ce (diff)
children 33f4330401d5
files
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/jingle/content.c	Tue Apr 21 22:17:18 2009 +0000
+++ b/libpurple/protocols/jabber/jingle/content.c	Wed Apr 22 18:37:31 2009 +0000
@@ -391,7 +391,13 @@
 jingle_content_parse(xmlnode *content)
 {
 	const gchar *type = xmlnode_get_namespace(xmlnode_get_child(content, "description"));
-	return JINGLE_CONTENT_CLASS(g_type_class_ref(jingle_get_type(type)))->parse(content);
+	GType jingle_type = jingle_get_type(type);
+
+	if (jingle_type != G_TYPE_NONE) {
+		return JINGLE_CONTENT_CLASS(g_type_class_ref(jingle_type))->parse(content);
+	} else {
+		return NULL;
+	}
 }
 
 static xmlnode *