Index: gstplaybasebin.c
===================================================================
RCS file: /cvs/gstreamer/gst-plugins-base/gst/playback/gstplaybasebin.c,v
retrieving revision 1.153
diff -u -p -r1.153 gstplaybasebin.c
--- gstplaybasebin.c	11 Sep 2007 11:29:12 -0000	1.153
+++ gstplaybasebin.c	5 Nov 2007 15:38:23 -0000
@@ -671,9 +671,15 @@ queue_threshold_reached (GstElement * qu
         play_base_bin->queue_min_threshold, NULL);
   }
 
+  GROUP_LOCK (play_base_bin);
+  group = get_active_group (play_base_bin);
+  if (!group) {
+    GROUP_UNLOCK (play_base_bin);
+    return;
+  }
+
   /* we remove the probe now because we don't need it anymore to give progress
    * about the buffering. */
-  group = get_active_group (play_base_bin);
   for (n = 0; n < NUM_TYPES; n++) {
     GstElement *element = group->type[n].preroll;
 
@@ -683,6 +689,8 @@ queue_threshold_reached (GstElement * qu
     queue_remove_probe (element, play_base_bin);
   }
 
+  GROUP_UNLOCK (play_base_bin);
+
   /* we post a 100% buffering message to notify the app that buffering is
    * completed and playback can start/continue */
   if (play_base_bin->is_stream)
@@ -2205,6 +2213,7 @@ could_not_link:
 static void
 finish_source (GstPlayBaseBin * play_base_bin)
 {
+  /* FIXME: no need to grab the group lock here? (tpm) */
   if (get_active_group (play_base_bin) != NULL) {
     if (play_base_bin->subtitle) {
       /* make subs iterate from now on */
