evas: Make safety check more lenient

This is to avoid ERR messages such as "object is not an image!"
that can happen when a legacy image function is called on an
eo image (proxy, 3d, ...) object.

Note: This does not fix any known issue, but it's probably a safer
solution.
This commit is contained in:
Jean-Philippe Andre 2016-08-05 10:59:48 +09:00
parent 28c917836c
commit 917f34587b
1 changed files with 1 additions and 1 deletions

View File

@ -4,7 +4,7 @@
#include "evas_image.eo.h"
#define EVAS_IMAGE_API(_o, ...) do { \
if (EINA_UNLIKELY(!eo_isa(_o, EVAS_IMAGE_CLASS))) { \
if (EINA_UNLIKELY(!eo_isa(_o, EFL_CANVAS_IMAGE_INTERNAL_CLASS))) { \
EINA_SAFETY_ERROR("object is not an image!"); \
return __VA_ARGS__; \
} } while (0)