diff options
author | 2010-04-02 20:47:54 +0200 | |
---|---|---|
committer | 2010-04-02 20:47:54 +0200 | |
commit | 43afc3b8e3cc41a41515810bd07e56e25f4d206c (patch) | |
tree | 88954da3e561d54cdac1b2331b4c470edbb6c21c /plugins/gtkui/callbacks.c | |
parent | afc9d00750d37e8a1e5e0c35e3c11bab20b2282f (diff) |
fixed several memleaks
Diffstat (limited to 'plugins/gtkui/callbacks.c')
-rw-r--r-- | plugins/gtkui/callbacks.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/plugins/gtkui/callbacks.c b/plugins/gtkui/callbacks.c index 761bd930..2b277a4c 100644 --- a/plugins/gtkui/callbacks.c +++ b/plugins/gtkui/callbacks.c @@ -496,6 +496,9 @@ seekbar_draw (GtkWidget *widget) { DB_playItem_t *trk = deadbeef->streamer_get_playing_track (); if (!trk || deadbeef->pl_get_item_duration (trk) < 0) { + if (trk) { + deadbeef->pl_item_unref (trk); + } clearlooks_rounded_rectangle (cr, 2, widget->allocation.height/2-4, widget->allocation.width-4, 8, 4, 0xff); // empty seekbar, just a frame cairo_set_source_rgb (cr, clr_selection->red/65535.f, clr_selection->green/65535.f, clr_selection->blue/65535.f ); @@ -539,6 +542,9 @@ seekbar_draw (GtkWidget *widget) { cairo_reset_clip (cr); cairo_destroy (cr); + if (trk) { + deadbeef->pl_item_unref (trk); + } } void @@ -613,6 +619,7 @@ on_seekbar_button_release_event (GtkWidget *widget, time = 0; } deadbeef->streamer_seek (time); + deadbeef->pl_item_unref (trk); } return FALSE; } |