summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2009-11-22 13:37:28 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2009-11-22 13:37:28 +0000
commit498cd522dacef530ac94908e8989f2e0948e5324 (patch)
tree69ca326282dde6919f0c7e866820ad73004e2054
parent2562f7e8c2840e2ae69b170e9bde7aeef8bc3b73 (diff)
downloadnetsurf-498cd522dacef530ac94908e8989f2e0948e5324.tar.gz
netsurf-498cd522dacef530ac94908e8989f2e0948e5324.tar.bz2
Avoid potential NULL pointer dereference
svn path=/trunk/netsurf/; revision=9685
-rw-r--r--desktop/save_text.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/desktop/save_text.c b/desktop/save_text.c
index 15f41702e..e34b9ceb0 100644
--- a/desktop/save_text.c
+++ b/desktop/save_text.c
@@ -134,13 +134,12 @@ void save_text_solve_whitespace(struct box *box, bool *first,
((box->parent && box->parent->list_marker == box) &&
*before == WHITESPACE_TAB))) {
*before = WHITESPACE_TWO_NEW_LINES;
- }
- else if (*before <= WHITESPACE_ONE_NEW_LINE &&
+ } else if (*before <= WHITESPACE_ONE_NEW_LINE &&
(box->type == BOX_TABLE_ROW ||
box->type == BOX_BR ||
(box->type != BOX_INLINE &&
(box->parent && box->parent->list_marker == box)) ||
- (box->parent->style &&
+ (box->parent && box->parent->style &&
(css_computed_white_space(box->parent->style) ==
CSS_WHITE_SPACE_PRE ||
css_computed_white_space(box->parent->style) ==