X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fpython%2Ftaglist.c;h=0a30c08e3ad9371bd5072fcef4f17b305f6a35e7;hb=879d0eec420fe0fd5ddcd56c8fe62b82a6744edd;hp=44d5c239dd845c886b3c384d49331e5aa3622225;hpb=a893580230f258ff41f1f5eab2f2d257ce90359d;p=swftools.git diff --git a/lib/python/taglist.c b/lib/python/taglist.c index 44d5c23..0a30c08 100644 --- a/lib/python/taglist.c +++ b/lib/python/taglist.c @@ -45,7 +45,7 @@ PyObject * taglist_new2(TAG*tag) while(t) {len++;last=t;t=t->next;} if(last && last->id==ST_END) { - swf_DeleteTag(last); last = 0; + swf_DeleteTag(0, last); last = 0; len--; if(len==0) tag = 0; } @@ -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; }