seek: wait for the spinbutton widget
authorWim Taymans <wim.taymans@collabora.co.uk>
Wed, 22 Jun 2011 10:57:46 +0000 (12:57 +0200)
committerWim Taymans <wim.taymans@collabora.co.uk>
Wed, 22 Jun 2011 10:57:46 +0000 (12:57 +0200)
Wait for the spinbutton widget before trying to update it when the volume
changed callback is called.

tests/examples/seek/seek.c

index 0850892..a49a9cd 100644 (file)
@@ -1135,6 +1135,9 @@ volume_notify_cb (GstElement * pipeline, GParamSpec * arg, gpointer user_dat)
 {
   gdouble cur_volume, new_volume;
 
+  if (volume_spinbutton == NULL)
+    return;
+
   g_object_get (pipeline, "volume", &new_volume, NULL);
   cur_volume = gtk_spin_button_get_value (GTK_SPIN_BUTTON (volume_spinbutton));
   if (fabs (cur_volume - new_volume) > 0.001) {