OSDN Git Service

oswf_shape_with_style_build でエラーがあった時に関数を抜ける処理
authoryoya <yoya@7c90b180-03d5-4157-b861-58a559ae9d1e>
Wed, 13 Oct 2010 15:27:01 +0000 (15:27 +0000)
committeryoya <yoya@7c90b180-03d5-4157-b861-58a559ae9d1e>
Wed, 13 Oct 2010 15:27:01 +0000 (15:27 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/swfed/trunk@244 7c90b180-03d5-4157-b861-58a559ae9d1e

src/swf_shape_with_style.c

index 6667d81..b93e55c 100644 (file)
@@ -21,8 +21,15 @@ swf_shape_with_style_parse(bitstream_t *bs,
 
 int
 swf_shape_with_style_build(bitstream_t *bs, swf_shape_with_style_t *shape_with_style, swf_tag_t *tag) {
-    swf_styles_build(bs, &(shape_with_style->styles), tag);
-    swf_shape_record_build(bs, &(shape_with_style->shape_records), tag);
+    int ret;
+    ret = swf_styles_build(bs, &(shape_with_style->styles), tag);
+    if (ret) {
+        return ret;
+    }
+    ret = swf_shape_record_build(bs, &(shape_with_style->shape_records), tag);
+    if (ret) {
+        return ret;
+    }
     return 0;
 }