Check for null style before using it.

svn path=/trunk/netsurf/; revision=2986
This commit is contained in:
James Bursa 2006-10-09 21:34:34 +00:00
parent a785bc25f7
commit 7b30364bc3

View File

@ -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;
}