diff --git a/ChangeLog b/ChangeLog index f4a950d1dd..065bbc7dcf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-01-07 Ronald S. Bultje + + * gst/gstprobe.c: (gst_probe_dispatcher_dispatch): + Check for existence of probe after performing the probe before + re-accessing it to prevent segfaults caused by removal of the + probe in the callback. + 2005-01-05 David Schleef * testsuite/registry/Makefile.am: diff --git a/gst/gstprobe.c b/gst/gstprobe.c index e4d4588157..67536e2640 100644 --- a/gst/gstprobe.c +++ b/gst/gstprobe.c @@ -218,7 +218,8 @@ gst_probe_dispatcher_dispatch (GstProbeDispatcher * disp, GstData ** data) walk = g_slist_next (walk); res &= gst_probe_perform (probe, data); - if (probe->single_shot) { + /* it might have disappeared in the callback */ + if (g_slist_find (disp->probes, probe) && probe->single_shot) { disp->probes = g_slist_remove (disp->probes, probe); gst_probe_destroy (probe);