diff options
author | Baptiste DURAND <baptiste.durand@open.eurogiciel.org> | 2014-01-16 16:56:13 +0100 |
---|---|---|
committer | Baptiste DURAND <baptiste.durand@open.eurogiciel.org> | 2014-01-16 16:59:55 +0100 |
commit | a7d4e1ec6c0b973431b56b6a92bb960a2ee09693 (patch) | |
tree | 7d259e1089e5aa7f4aaf1c2a1a0561fd06354484 | |
parent | 9e59edb4e174cae588c806b1e20a88fc8b83edcb (diff) | |
download | edje-accepted/tizen/generic.tar.gz edje-accepted/tizen/generic.tar.bz2 edje-accepted/tizen/generic.zip |
TIVI-2144 : Fix Segfault during popup process creationHEADsubmit/tizen_ivi_release/20140312.071222submit/tizen/20140312.070748submit/tizen/20140116.170845accepted/tizen/ivi/release/20140312.124146accepted/tizen/ivi/panda/20140312.110856accepted/tizen/ivi/20140117.182310accepted/tizen/generic/20140312.100441accepted/tizen/generic/20140117.074918tizen_ivi_releasetizenaccepted/tizen_ivi_releaseaccepted/tizen_ivi_pandaaccepted/tizen_iviaccepted/tizen_genericaccepted/tizen/ivi/stableaccepted/tizen/generic
Add pointer test to allow the function call _edje_part_recalc_single_textblock with null args
-> backport test pointer from current EFL version (1.8.4)
Change-Id: Ie7d183110075f6f32936cb66203e2a16976e9aca
Signed-off-by: Baptiste DURAND <baptiste.durand@open.eurogiciel.org>
-rw-r--r-- | src/lib/edje_calc.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/lib/edje_calc.c b/src/lib/edje_calc.c index db9ab1d..5a36b8b 100644 --- a/src/lib/edje_calc.c +++ b/src/lib/edje_calc.c @@ -1259,11 +1259,12 @@ _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; } @@ -1285,15 +1286,16 @@ _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)) |