X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fpython%2Ftaglist.c;h=e4eeffc2bb39aea5c5bd008638a83717b53fc6b0;hb=a6d5a31e91e224064e105b5383ebbdce79060997;hp=711817e168ffe6fac31d804d552299a111e19d59;hpb=1db6d1ee4107fcceab86d2d8fe16c05983e320f8;p=swftools.git diff --git a/lib/python/taglist.c b/lib/python/taglist.c index 711817e..e4eeffc 100644 --- a/lib/python/taglist.c +++ b/lib/python/taglist.c @@ -42,9 +42,14 @@ PyObject * taglist_new2(TAG*tag) t = tag; while(t) { 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); + int id = swf_GetDefineID(t); + tagmap_addMapping(taglist->tagmap, id, newtag); } nr++; t=t->next;