diff options
author | 2010-07-04 15:36:26 +0300 | |
---|---|---|
committer | 2010-07-04 15:36:26 +0300 | |
commit | 927e297e50d9820ccea7a3356e3d294a0514eb5a (patch) | |
tree | 328fbd899d1f7e6767fc1c9081097c1a18f0c0f6 /plugins/gtkui | |
parent | dbca894cb0a4872481e0026b81d2b3ae083d1485 (diff) |
fixed refleak; minor fixups
Diffstat (limited to 'plugins/gtkui')
-rw-r--r-- | plugins/gtkui/plcommon.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/gtkui/plcommon.c b/plugins/gtkui/plcommon.c index a24cb935..9f5b32df 100644 --- a/plugins/gtkui/plcommon.c +++ b/plugins/gtkui/plcommon.c @@ -350,8 +350,6 @@ void actionitem_activate (GtkMenuItem *menuitem, DB_plugin_action_t *action) { - DB_playItem_t *it = deadbeef->pl_get_first (PL_MAIN); - // Plugin can handle all tracks by itself if (action->flags & DB_ACTION_CAN_MULTIPLE_TRACKS) { @@ -369,7 +367,8 @@ actionitem_activate (GtkMenuItem *menuitem, return; } - //We end up here if plugin won't traverse tracks and we have to do it for him + //We end up here if plugin won't traverse tracks and we have to do it ourselves + DB_playItem_t *it = deadbeef->pl_get_first (PL_MAIN); while (it) { if (deadbeef->pl_is_selected (it)) action->callback (it, action->data); @@ -377,6 +376,7 @@ actionitem_activate (GtkMenuItem *menuitem, deadbeef->pl_item_unref (it); it = next; } + deadbeef->pl_item_unref (it); } void |