handle undefined ID exception
[swftools.git] / lib / python / taglist.c
index 711817e..630fb29 100644 (file)
@@ -42,6 +42,10 @@ 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);