From 7ec295a0cd710b04871f6c26d6f9417de0581d4a Mon Sep 17 00:00:00 2001 From: Iain Holmes Date: Sat, 11 Jan 2003 13:44:33 +0000 Subject: [PATCH] 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 --- gst/schedulers/gstbasicscheduler.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gst/schedulers/gstbasicscheduler.c b/gst/schedulers/gstbasicscheduler.c index 7111e5a954..20d7dff065 100644 --- a/gst/schedulers/gstbasicscheduler.c +++ b/gst/schedulers/gstbasicscheduler.c @@ -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--;