changeset 26729:33f4330401d5

merge of '9a8c2abfdbcf669fd21ec24f4aa474ac55a2ecb9' and 'fe650fc58681996bf988489a65e10198e25c1fd3'
author Marcus Lundblad <ml@update.uu.se>
date Wed, 22 Apr 2009 18:39:41 +0000
parents d06af7664a7a (diff) 9e0001caa207 (current diff)
children 660660e0e8c6
files
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/jingle/content.c	Wed Apr 22 17:07:41 2009 +0000
+++ b/libpurple/protocols/jabber/jingle/content.c	Wed Apr 22 18:39:41 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 *