Evas textblock: fix cached markup's stringshare refs 20/66920/2
authorDaniel Hirt <daniel.hirt@samsung.com>
Sun, 28 Feb 2016 15:33:40 +0000 (17:33 +0200)
committerYoungbok Shin <youngb.shin@samsung.com>
Mon, 25 Apr 2016 04:24:52 +0000 (21:24 -0700)
The last fix 34020ed131c7a5da4d60bb3a452fac0d9ee5fdd1 was missing a
stringshare_del for the NOP case of markup_set. It led to a
constantly increasing ref count of the cached markup.

@fix

Change-Id: Ibd27474c54ed96329b9178c87917963cd4a15c0f

src/lib/evas/canvas/evas_object_textblock.c

index ec1f85f..c5cc28f 100644 (file)
@@ -6859,6 +6859,7 @@ _evas_textblock_text_markup_set(Eo *eo_obj EINA_UNUSED, Evas_Textblock_Data *o,
         text = eina_stringshare_add(text);
         if (text == o->markup_text)
           {
+             eina_stringshare_del(text);
              /* Text is the same, do nothing. */
              return;
           }