From bdc99f87b36dbabc0e2ac1b552fc79475e254050 Mon Sep 17 00:00:00 2001 From: kramm Date: Sat, 18 Dec 2004 16:55:24 +0000 Subject: [PATCH] small fixes. --- lib/python/taglist.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/python/taglist.c b/lib/python/taglist.c index 44d5c23..f6a0932 100644 --- a/lib/python/taglist.c +++ b/lib/python/taglist.c @@ -286,8 +286,10 @@ static PyObject * taglist_item(PyObject * self, int index) { TagListObject*taglist = (TagListObject*)self; PyObject*tag; - mylog(" %08x(%d) taglist_item(%d)", (int)self, self->ob_refcnt, index); tag = PyList_GetItem(taglist->taglist, index); + if(!tag) + return 0; + mylog(" %08x(%d) taglist_item(%d): %08x", (int)self, self->ob_refcnt, index, tag); Py_INCREF(tag); return tag; } -- 1.7.10.4