summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/evas_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/evas/canvas/evas_main.c')
-rw-r--r--src/lib/evas/canvas/evas_main.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/lib/evas/canvas/evas_main.c b/src/lib/evas/canvas/evas_main.c
index 757f3e47cd..fc53f64dc8 100644
--- a/src/lib/evas/canvas/evas_main.c
+++ b/src/lib/evas/canvas/evas_main.c
@@ -123,20 +123,28 @@ _efl_gfx_image_load_error_to_evas_load_error(Eina_Error err)
123static Eina_Content* 123static Eina_Content*
124_markup_to_utf8(Eina_Content *from, const char *to_type) 124_markup_to_utf8(Eina_Content *from, const char *to_type)
125{ 125{
126 Eina_Content *ret = NULL;
126 Eina_Slice slice = eina_content_data_get(from); 127 Eina_Slice slice = eina_content_data_get(from);
127 char *utf8 = evas_textblock_text_markup_to_utf8(NULL, slice.mem); 128 char *utf8 = evas_textblock_text_markup_to_utf8(NULL, slice.mem);
128 Eina_Content *ret = eina_content_new((Eina_Slice)EINA_SLICE_STR_FULL(utf8), to_type); 129 if (utf8)
129 free(utf8); 130 {
131 ret = eina_content_new((Eina_Slice)EINA_SLICE_STR_FULL(utf8), to_type);
132 free(utf8);
133 }
130 return ret; 134 return ret;
131} 135}
132 136
133static Eina_Content* 137static Eina_Content*
134_utf8_to_markup(Eina_Content *from, const char *to_type) 138_utf8_to_markup(Eina_Content *from, const char *to_type)
135{ 139{
140 Eina_Content *ret = NULL;
136 Eina_Slice slice = eina_content_data_get(from); 141 Eina_Slice slice = eina_content_data_get(from);
137 char *markup = evas_textblock_text_utf8_to_markup(NULL, slice.mem); 142 char *markup = evas_textblock_text_utf8_to_markup(NULL, slice.mem);
138 Eina_Content *ret = eina_content_new((Eina_Slice)EINA_SLICE_STR_FULL(markup), to_type); 143 if (markup)
139 free(markup); 144 {
145 ret = eina_content_new((Eina_Slice)EINA_SLICE_STR_FULL(markup), to_type);
146 free(markup);
147 }
140 return ret; 148 return ret;
141} 149}
142 150