From 66339105005ba8f1bcafc45b27603ad30a049339 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 22 Jun 2011 12:57:46 +0200 Subject: [PATCH] seek: wait for the spinbutton widget Wait for the spinbutton widget before trying to update it when the volume changed callback is called. --- tests/examples/seek/seek.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/examples/seek/seek.c b/tests/examples/seek/seek.c index 0850892..a49a9cd 100644 --- a/tests/examples/seek/seek.c +++ b/tests/examples/seek/seek.c @@ -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) { -- 2.7.4