summaryrefslogtreecommitdiff
path: root/render/layout.c
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@netsurf-browser.org>2007-12-23 16:09:02 +0000
committerDaniel Silverstone <dsilvers@netsurf-browser.org>2007-12-23 16:09:02 +0000
commit13b91169fde0fce632bb6d762b87353adb536aa7 (patch)
tree653bdcb031c7808393e445c88457f57c3b22881d /render/layout.c
parent23781fb8628b718bbc62d914338622fed8a7d61f (diff)
downloadnetsurf-13b91169fde0fce632bb6d762b87353adb536aa7.tar.gz
netsurf-13b91169fde0fce632bb6d762b87353adb536aa7.tar.bz2
Protect <pre> fix in cases where c->style is NULL
svn path=/trunk/netsurf/; revision=3673
Diffstat (limited to 'render/layout.c')
-rw-r--r--render/layout.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/render/layout.c b/render/layout.c
index 9f05486f3..5704089b6 100644
--- a/render/layout.c
+++ b/render/layout.c
@@ -893,9 +893,11 @@ bool layout_inline_container(struct box *inline_container, int width,
has_text_children = false;
for (c = inline_container->children; c; c = c->next) {
- bool is_pre = (c->style->white_space == CSS_WHITE_SPACE_PRE ||
- c->style->white_space == CSS_WHITE_SPACE_PRE_LINE ||
- c->style->white_space == CSS_WHITE_SPACE_PRE_WRAP);
+ bool is_pre = false;
+ if (c->style)
+ is_pre = (c->style->white_space == CSS_WHITE_SPACE_PRE ||
+ c->style->white_space == CSS_WHITE_SPACE_PRE_LINE ||
+ c->style->white_space == CSS_WHITE_SPACE_PRE_WRAP);
if ((!c->object && c->text && (c->length || is_pre)) || c->type == BOX_BR)
has_text_children = true;
}