summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBaptiste DURAND <baptiste.durand@open.eurogiciel.org>2014-01-16 16:56:13 +0100
committerBaptiste DURAND <baptiste.durand@open.eurogiciel.org>2014-01-16 16:59:55 +0100
commita7d4e1ec6c0b973431b56b6a92bb960a2ee09693 (patch)
tree7d259e1089e5aa7f4aaf1c2a1a0561fd06354484
parent9e59edb4e174cae588c806b1e20a88fc8b83edcb (diff)
downloadedje-accepted/tizen_ivi_panda.tar.gz
edje-accepted/tizen_ivi_panda.tar.bz2
edje-accepted/tizen_ivi_panda.zip
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.c16
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))