From 297cd971abc2ec807da433adb9a78ca73e16817b Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Fri, 14 Dec 2012 11:41:27 +0000 Subject: [PATCH] fix some NULL derefs in tb part recalc, also a typo which probably broke sizing SVN revision: 80935 --- legacy/edje/src/lib/edje_calc.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/legacy/edje/src/lib/edje_calc.c b/legacy/edje/src/lib/edje_calc.c index 97833da81e..8218088fe5 100644 --- a/legacy/edje/src/lib/edje_calc.c +++ b/legacy/edje/src/lib/edje_calc.c @@ -1239,11 +1239,11 @@ _edje_part_recalc_single_textblock(FLOAT_T sc, &ins_r, &ins_t, &ins_b); mw = ins_l + tw + ins_r; mh = ins_t + th + ins_b; - if (chosen_desc->text.min_x) + if (minw && chosen_desc->text.min_x) { if (mw > *minw) *minw = mw; } - if (chosen_desc->text.min_y) + if (minh && chosen_desc->text.min_y) { if (mh > *minh) *minh = mh; } @@ -1266,15 +1266,15 @@ _edje_part_recalc_single_textblock(FLOAT_T sc, &ins_t, &ins_b); mw = ins_l + tw + ins_r; mh = ins_t + th + ins_b; - if (chosen_desc->text.max_x) + if (maxw && chosen_desc->text.max_x) { if (mw > *maxw) *maxw = mw; - if (*maxw < *minw) *maxw = *minw; + if (minw && (*maxw < *minw)) *maxw = *minw; } - if (chosen_desc->text.max_y) + if (maxh && chosen_desc->text.max_y) { - if (mh > *maxw) *maxh = mh; - if (*maxh < *minh) *maxh = *minh; + if (mh > *maxh) *maxh = mh; + if (minh && (*maxh < *minh)) *maxh = *minh; } } if ((chosen_desc->text.fit_x) || (chosen_desc->text.fit_y))