summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/evas_filter_mixin.c
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2015-10-08 15:01:21 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2015-10-12 13:44:44 +0900
commitd271afd66c5a1c160f2d19941d00217f370bfeae (patch)
tree0e09b95dda1d43647d5fa4f6407c4afb43c44cfb /src/lib/evas/canvas/evas_filter_mixin.c
parenta8243ed382780615dd572babfeee3a333375ba80 (diff)
Evas filters: Fix some crash and reduce insanity
In a rare situation the filter would access an invalid buffer. Solution: Stop messing with buffer references by properly referencing and releasing them when not needed, rather than stealing references and hoping for the best. (There were flags tracking stolen references, but that was still madness)
Diffstat (limited to 'src/lib/evas/canvas/evas_filter_mixin.c')
-rw-r--r--src/lib/evas/canvas/evas_filter_mixin.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/lib/evas/canvas/evas_filter_mixin.c b/src/lib/evas/canvas/evas_filter_mixin.c
index 46bf5fe..2722a48 100644
--- a/src/lib/evas/canvas/evas_filter_mixin.c
+++ b/src/lib/evas/canvas/evas_filter_mixin.c
@@ -238,8 +238,7 @@ evas_filter_object_render(Eo *eo_obj, Evas_Object_Protected_Data *obj,
238 238
239 // Steal output and release previous 239 // Steal output and release previous
240 filter_output = evas_filter_buffer_backing_steal(filter, EVAS_FILTER_BUFFER_OUTPUT_ID); 240 filter_output = evas_filter_buffer_backing_steal(filter, EVAS_FILTER_BUFFER_OUTPUT_ID);
241 if (filter_output != previous) 241 evas_filter_buffer_backing_release(filter, previous);
242 evas_filter_buffer_backing_release(filter, previous);
243 242
244 // Request rendering from the object itself (child class) 243 // Request rendering from the object itself (child class)
245 evas_filter_program_padding_get(pd->data->chain, &l, &r, &t, &b); 244 evas_filter_program_padding_get(pd->data->chain, &l, &r, &t, &b);