Don't remove an element from its chain if it doesn't have a chain

Original commit message from CVS:
Don't remove an element from its chain if it doesn't have a chain
This commit is contained in:
Iain Holmes 2003-01-11 13:44:33 +00:00
parent 7f09b68704
commit 7ec295a0cd

View file

@ -1042,8 +1042,10 @@ gst_basic_scheduler_remove_element (GstScheduler * sched, GstElement * element)
chain = gst_basic_scheduler_find_chain (bsched, element);
/* remove it from its chain */
gst_basic_scheduler_chain_remove_element (chain, element);
if (chain != NULL) {
gst_basic_scheduler_chain_remove_element (chain, element);
}
/* remove it from the list of elements */
bsched->elements = g_list_remove (bsched->elements, element);
bsched->num_elements--;