summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/parse/properties/background_position.c26
1 files changed, 22 insertions, 4 deletions
diff --git a/src/parse/properties/background_position.c b/src/parse/properties/background_position.c
index 992372b..d4b31dc 100644
--- a/src/parse/properties/background_position.c
+++ b/src/parse/properties/background_position.c
@@ -194,12 +194,30 @@ css_error css__parse_background_position(css_language *c,
if ((flags & FLAG_INHERIT) == false) {
if (value[0] == BACKGROUND_POSITION_HORZ_SET) {
- css__stylesheet_style_append(result, length[0]);
- css__stylesheet_style_append(result, unit[0]);
+ error = css__stylesheet_style_append(result, length[0]);
+ if (error != CSS_OK) {
+ *ctx = orig_ctx;
+ return error;
+ }
+
+ error = css__stylesheet_style_append(result, unit[0]);
+ if (error != CSS_OK) {
+ *ctx = orig_ctx;
+ return error;
+ }
}
if (value[1] == BACKGROUND_POSITION_VERT_SET) {
- css__stylesheet_style_append(result, length[1]);
- css__stylesheet_style_append(result, unit[1]);
+ error = css__stylesheet_style_append(result, length[1]);
+ if (error != CSS_OK) {
+ *ctx = orig_ctx;
+ return error;
+ }
+
+ error = css__stylesheet_style_append(result, unit[1]);
+ if (error != CSS_OK) {
+ *ctx = orig_ctx;
+ return error;
+ }
}
}