diff options
author | waker <wakeroid@gmail.com> | 2011-09-18 19:18:50 +0200 |
---|---|---|
committer | waker <wakeroid@gmail.com> | 2011-09-18 19:18:50 +0200 |
commit | a1fe093ae782eab7b1e7b093747262a0789a467c (patch) | |
tree | 4a4c593317e63febd8aa6a3e271dca14303849ed | |
parent | d6c42a055bf86ea8ccee8f4261aadff3441f906e (diff) |
fixed memleak caused by tooltip handler
-rw-r--r-- | playlist.c | 4 | ||||
-rw-r--r-- | plugins/gtkui/mainplaylist.c | 1 | ||||
-rw-r--r-- | plugins/gtkui/plcommon.c | 1 |
3 files changed, 4 insertions, 2 deletions
@@ -145,7 +145,7 @@ pl_free (void) { for (playItem_t *it = playlists_head->head[PL_MAIN]; it; it = it->next[PL_MAIN]) { if (it->_refc > 1) { - fprintf (stderr, "\033[0;31mWARNING: playitem %p %s has refc=%d at delete time\033[37;0m\n", it, pl_find_meta (it, ":URI"), it->_refc); + fprintf (stderr, "\033[0;31mWARNING: playitem %p %s(%s) has refc=%d at delete time\033[37;0m\n", it, pl_find_meta (it, ":URI"), pl_find_meta (it, "track"), it->_refc); } } @@ -1964,7 +1964,7 @@ void pl_item_ref (playItem_t *it) { LOCK; it->_refc++; - //trace ("\033[0;34m+it %p: refc=%d: %s\033[37;0m\n", it, it->_refc, pl_find_meta (it, ":URI")); + //fprintf (stderr, "\033[0;34m+it %p: refc=%d: %s\033[37;0m\n", it, it->_refc, pl_find_meta (it, ":URI")); UNLOCK; } diff --git a/plugins/gtkui/mainplaylist.c b/plugins/gtkui/mainplaylist.c index d8721e8b..f22bb5aa 100644 --- a/plugins/gtkui/mainplaylist.c +++ b/plugins/gtkui/mainplaylist.c @@ -132,6 +132,7 @@ playlist_tooltip_handler (GtkWidget *widget, gint x, gint y, gboolean keyboard_m DB_playItem_t *it = (DB_playItem_t *)ddb_listview_get_iter_from_coord (DDB_LISTVIEW (pl), 0, y); if (it) { gtk_tooltip_set_text (tooltip, deadbeef->pl_find_meta (it, ":URI")); + deadbeef->pl_item_unref (it); return TRUE; } return FALSE; diff --git a/plugins/gtkui/plcommon.c b/plugins/gtkui/plcommon.c index f09293c3..c7b04e6d 100644 --- a/plugins/gtkui/plcommon.c +++ b/plugins/gtkui/plcommon.c @@ -416,6 +416,7 @@ find_popup (GtkWidget *widget, widget_name); return found_widget; } + void list_context_menu (DdbListview *listview, DdbListviewIter it, int idx) { clicked_idx = deadbeef->pl_get_idx_of (it); |