diff options
Diffstat (limited to 'src')
-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)) |