ges-launch: Gracefully handle missing properties

This commit is contained in:
Edward Hervey 2010-11-25 14:03:07 +01:00
parent da806759d1
commit d2019f3a3d

View file

@ -318,7 +318,7 @@ print_transition_list (void)
tr = ges_timeline_transition_new (GES_VIDEO_TRANSITION_TYPE_CROSSFADE);
klass = GES_TIMELINE_TRANSITION_GET_CLASS (tr);
pspec = g_object_class_find_property (G_OBJECT_CLASS (klass), "vtype");
if ((pspec = g_object_class_find_property (G_OBJECT_CLASS (klass), "vtype"))) {
smpte_class = G_ENUM_CLASS (g_type_class_ref (pspec->value_type));
@ -327,6 +327,8 @@ print_transition_list (void)
}
g_type_class_unref (smpte_class);
}
g_object_unref (tr);
}
@ -342,7 +344,8 @@ print_pattern_list (void)
tr = ges_timeline_test_source_new ();
klass = GES_TIMELINE_TEST_SOURCE_GET_CLASS (tr);
pspec = g_object_class_find_property (G_OBJECT_CLASS (klass), "vpattern");
if ((pspec =
g_object_class_find_property (G_OBJECT_CLASS (klass), "vpattern"))) {
enum_class = G_ENUM_CLASS (g_type_class_ref (pspec->value_type));
@ -351,6 +354,7 @@ print_pattern_list (void)
}
g_type_class_unref (enum_class);
}
g_object_unref (tr);
}