From 498cd522dacef530ac94908e8989f2e0948e5324 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Sun, 22 Nov 2009 13:37:28 +0000 Subject: Avoid potential NULL pointer dereference svn path=/trunk/netsurf/; revision=9685 --- desktop/save_text.c | 5 ++--- 1 file 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) == -- cgit v1.2.3