diff options
-rw-r--r-- | render/layout.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/render/layout.c b/render/layout.c index dfd4ab321..02c7c2155 100644 --- a/render/layout.c +++ b/render/layout.c @@ -216,8 +216,9 @@ bool layout_block_context(struct box *block, struct content *content) * correct handling of floats. */ - if (box->style->position == CSS_POSITION_ABSOLUTE || - box->style->position == CSS_POSITION_FIXED) { + if (box->style && + (box->style->position == CSS_POSITION_ABSOLUTE|| + box->style->position == CSS_POSITION_FIXED)) { box->x = box->parent->padding[LEFT]; goto advance_to_next_box; } |