diff options
author | Alexey Yakovenko <wakeroid@gmail.com> | 2010-03-17 21:19:04 +0100 |
---|---|---|
committer | Alexey Yakovenko <wakeroid@gmail.com> | 2010-03-17 21:19:04 +0100 |
commit | af6e4cb3ad53df942abae4b1dbe8068e6e72408d (patch) | |
tree | 67bbfc17a8b1a01ecc9236f302bfeab38d34d5ef /playlist.c | |
parent | a7f8a0cdaad783fb53ef7b5f89279a0be969d911 (diff) |
fixed crash after drag-n-drop from filemanager
Diffstat (limited to 'playlist.c')
-rw-r--r-- | playlist.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -997,6 +997,7 @@ pl_insert_pls (playItem_t *after, const char *fname, int *pabort, int (*cb)(play playItem_t * pl_insert_file (playItem_t *after, const char *fname, int *pabort, int (*cb)(playItem_t *it, void *data), void *user_data) { + trace ("count: %d\n", playlist->count[PL_MAIN]); trace ("pl_insert_file %s\n", fname); if (!fname || !(*fname)) { return NULL; @@ -1077,6 +1078,7 @@ pl_insert_file (playItem_t *after, const char *fname, int *pabort, int (*cb)(pla if (cb && cb (inserted, user_data) < 0) { *pabort = 1; } + pl_item_ref (inserted); return inserted; } } @@ -1353,7 +1355,7 @@ void pl_item_ref (playItem_t *it) { LOCK; it->_refc++; - trace ("+it %p: refc=%d: %s\n", it, it->_refc, it->fname); +// trace ("+it %p: refc=%d: %s\n", it, it->_refc, it->fname); UNLOCK; } @@ -1379,7 +1381,7 @@ void pl_item_unref (playItem_t *it) { LOCK; it->_refc--; - trace ("-it %p: refc=%d: %s\n", it, it->_refc, it->fname); +// trace ("-it %p: refc=%d: %s\n", it, it->_refc, it->fname); if (it->_refc < 0) { trace ("\033[0;31mplaylist: bad refcount on item %p\033[37;0m\n", it); } |