Evas textblock: Fix segfault with evas_textblock_cursor_content_get.

Patch by Brian Wang.

SVN revision: 59347
This commit is contained in:
Tom Hacohen 2011-05-12 15:12:10 +00:00
parent 7fbe314439
commit 8315f9879c
2 changed files with 5 additions and 1 deletions

View File

@ -333,3 +333,7 @@
* Add smart instance usage count get function for ability to free
data from memory from a smart class if needed.
2011-05-12 Brian Wang
* Textblock: fix segfault with evas_textblock_cursor_content_get

View File

@ -6890,7 +6890,7 @@ evas_textblock_cursor_content_get(const Evas_Textblock_Cursor *cur)
tmp = evas_textblock_node_format_text_get(
_evas_textblock_node_visible_at_pos_get(
evas_textblock_cursor_format_get(cur)));
return strdup(tmp);
return (tmp) ? strdup(tmp) : NULL;
}
ustr = eina_ustrbuf_string_get(cur->node->unicode);