From: Wim T. <wt...@us...> - 2002-06-02 17:44:33
|
CVS Root: /cvsroot/gstreamer Module: gstreamer Changes by: wtay Date: Sun Jun 02 2002 10:44:32 PDT Log message: Some sanity checking for when the element was removed from the pipeline. Modified files: gst/schedulers : gstbasicscheduler.c Links: http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/schedulers/gstbasicscheduler.c.diff?r1=1.35&r2=1.36 ====Begin Diffs==== Index: gstbasicscheduler.c =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/gst/schedulers/gstbasicscheduler.c,v retrieving revision 1.35 retrieving revision 1.36 diff -u -d -r1.35 -r1.36 --- gstbasicscheduler.c 2 Jun 2002 16:20:09 -0000 1.35 +++ gstbasicscheduler.c 2 Jun 2002 17:44:20 -0000 1.36 @@ -324,9 +324,12 @@ /* due to oddities in the cothreads code, when this function returns it will * switch to the main cothread. thus, we need to unlock the current element. */ - if (SCHED (element)->current->post_run_func) - SCHED (element)->current->post_run_func (SCHED (element)->current); - SCHED (element)->current = NULL; + if (SCHED (element)) { + if (SCHED (element)->current && SCHED (element)->current->post_run_func) { + SCHED (element)->current->post_run_func (SCHED (element)->current); + } + SCHED (element)->current = NULL; + } GST_DEBUG_LEAVE ("(%d,'%s')", argc, name); gst_object_unref (GST_OBJECT (element)); |