summaryrefslogtreecommitdiff
path: root/audio/albumplayer/patches/patch-ad
blob: 5274f03c8e2b2cf490051bfbcbf34b5ab085ce62 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
$NetBSD: patch-ad,v 1.1 2009/09/09 16:54:13 drochner Exp $

--- main.c.orig	2009-09-08 22:05:17.000000000 +0200
+++ main.c
@@ -55,6 +55,7 @@ GdkPixbuf *questionmark;
 GdkPixbuf *coverlayer;
 gchar *last_canteen = NULL;
 int sched_seek = -1;
+int shutting_down;
 
 GdkPixbuf* scale_width(GdkPixbuf* pb, float nw) {
   double width = gdk_pixbuf_get_width(pb);
@@ -601,6 +602,8 @@ void pause_cb(gpointer seekbar) {
 }
 
 gboolean progress_timeout_cb(gpointer seekbar) {
+  if (shutting_down) /* seekbar can be already invalid */
+    return false;
   if(loaded) {
     g_signal_handlers_block_by_func(seekbar, seek_cb, seekbar);
 
@@ -860,6 +863,7 @@ main (int argc, char *argv[])
     gst_element_set_state(pipeline, GST_STATE_NULL);
     gst_object_unref(GST_OBJECT(pipeline));
   }
+  shutting_down = 1;
   g_object_unref (G_OBJECT (builder));
   g_object_unref (G_OBJECT (gconf));