changeset 31934:eca71aa27e21

Fix another vvconfig crash. Fixes #13290, #13774. committer: John Bailey <rekkanoryo@rekkanoryo.org>
author pat@erley.org
date Sat, 30 Apr 2011 16:24:14 +0000
parents b671728e6ee9
children 039867991a51
files pidgin/plugins/vvconfig.c
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/plugins/vvconfig.c	Tue Apr 19 05:05:25 2011 +0000
+++ b/pidgin/plugins/vvconfig.c	Sat Apr 30 16:24:14 2011 +0000
@@ -90,7 +90,17 @@
 	}
 
 	element = gst_element_factory_make(element_name, "test");
+	if(!element) {
+		purple_debug_info("vvconfig", "'%s' - unable to find element\n", element_name);
+		return g_list_reverse(ret);
+	}
+
 	klass = G_OBJECT_GET_CLASS (element);
+	if(!klass) {
+		purple_debug_info("vvconfig", "'%s' - unable to find G_Object Class\n", element_name);
+		return g_list_reverse(ret);
+	}
+
 	if (!g_object_class_find_property(klass, "device") ||
 			!GST_IS_PROPERTY_PROBE(element) ||
 			!(probe = GST_PROPERTY_PROBE(element)) ||