X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fpython%2Ftaglist.c;h=630fb292e375a4fc06d3b0bd25b4eb9b1cf0af24;hb=c5a01b369d8e9318a980defffe7d805b682f66b3;hp=9caf3b2a216b9dbaab368b7dbd5f96517b314428;hpb=3281edc9ef69c0ba876f0146f55540227aa6a7fb;p=swftools.git diff --git a/lib/python/taglist.c b/lib/python/taglist.c index 9caf3b2..630fb29 100644 --- a/lib/python/taglist.c +++ b/lib/python/taglist.c @@ -41,7 +41,11 @@ PyObject * taglist_new2(TAG*tag) nr = 0; t = tag; while(t) { - PyObject*newtag = tag_new2(tag, taglist->tagmap); + PyObject*newtag = tag_new2(t, taglist->tagmap); + if(newtag==NULL) { + // pass through exception + return NULL; + } PyList_SET_ITEM(taglist->taglist,nr,newtag);Py_INCREF(newtag); if(swf_isDefiningTag(t)) { tagmap_add(taglist->tagmap, newtag); @@ -72,6 +76,7 @@ TAG* taglist_getTAGs(PyObject*self) tag = tag_getTAG(item, tag, taglist->tagmap); if(!firstTag) firstTag = tag; + mylog(" %08x(%d) taglist_getTAGs: added tag %08x", (int)self, self->ob_refcnt, tag); } return firstTag; }