fix some NULL derefs in tb part recalc, also a typo which probably broke sizing

SVN revision: 80935
This commit is contained in:
Mike Blumenkrantz 2012-12-14 11:41:27 +00:00
parent fd90f7b882
commit 297cd971ab
1 changed files with 7 additions and 7 deletions

View File

@ -1239,11 +1239,11 @@ _edje_part_recalc_single_textblock(FLOAT_T sc,
&ins_r, &ins_t, &ins_b); &ins_r, &ins_t, &ins_b);
mw = ins_l + tw + ins_r; mw = ins_l + tw + ins_r;
mh = ins_t + th + ins_b; 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 (mw > *minw) *minw = mw;
} }
if (chosen_desc->text.min_y) if (minh && chosen_desc->text.min_y)
{ {
if (mh > *minh) *minh = mh; if (mh > *minh) *minh = mh;
} }
@ -1266,15 +1266,15 @@ _edje_part_recalc_single_textblock(FLOAT_T sc,
&ins_t, &ins_b); &ins_t, &ins_b);
mw = ins_l + tw + ins_r; mw = ins_l + tw + ins_r;
mh = ins_t + th + ins_b; 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 (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 (mh > *maxh) *maxh = mh;
if (*maxh < *minh) *maxh = *minh; if (minh && (*maxh < *minh)) *maxh = *minh;
} }
} }
if ((chosen_desc->text.fit_x) || (chosen_desc->text.fit_y)) if ((chosen_desc->text.fit_x) || (chosen_desc->text.fit_y))