X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=blobdiff_plain;f=lib%2Fpython%2FSWF.c;h=d8ff0062878e898eb040d757dd1691284835dae5;hp=b1919277201ea61013eb2f198ccbf0f939df770e;hb=c5a01b369d8e9318a980defffe7d805b682f66b3;hpb=1db6d1ee4107fcceab86d2d8fe16c05983e320f8 diff --git a/lib/python/SWF.c b/lib/python/SWF.c index b191927..d8ff006 100644 --- a/lib/python/SWF.c +++ b/lib/python/SWF.c @@ -125,6 +125,9 @@ static PyObject* f_load(PyObject* self, PyObject* args) close(fi); swf->taglist = taglist_new2(swf->swf.firstTag); + if(swf->taglist == NULL) { + return NULL; + } swf->swf.firstTag = 0; return (PyObject*)swf; @@ -163,8 +166,10 @@ static PyObject * swf_save(PyObject* self, PyObject* args, PyObject* kwargs) TAG*tag = swf->firstTag; if(!tag) tag = swf->firstTag = swf_InsertTag(0,ST_END); - while(tag && tag->next) + while(tag && tag->next) { + mylog(" tag:%08x\n", tag); tag = tag->next; + } if(tag->id != ST_END) { tag = swf_InsertTag(tag,ST_END); }