forked from enlightenment/efl
Don't leak, and be consistent with return values.
SVN revision: 40101
This commit is contained in:
parent
8292408792
commit
994190d144
|
@ -388,7 +388,7 @@ evas_common_font_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font
|
|||
prev_index = index;
|
||||
}
|
||||
#ifdef INTERNATIONAL_SUPPORT
|
||||
if (bidi_err < 0) {
|
||||
if (bidi_err >= 0) {
|
||||
free(level_list);
|
||||
free(text);
|
||||
}
|
||||
|
|
|
@ -29,8 +29,11 @@ evas_intl_utf8_to_visual(const char *text, int *ret_len, FriBidiCharType *direct
|
|||
|
||||
/* if there's nothing to do, return text
|
||||
* one char draws are quite common */
|
||||
if (len <= 1)
|
||||
return text;
|
||||
if (len <= 1) {
|
||||
*ret_len = len;
|
||||
*embedding_level_list = NULL;
|
||||
return strdup(text);
|
||||
}
|
||||
|
||||
byte_len = strlen(text); /* we need the actual number of bytes, not number of chars */
|
||||
|
||||
|
|
Loading…
Reference in New Issue