elm elm_widget.c: Added elm_widget_sub_object_add() parameter

verification. Patch by Taehwan Kim <ohpowel@gmail.com>

On Tue, Apr 10, 2012 at 5:37 PM, Bluezery <ohpowel@gmail.com> wrote:
> Hello,
>
> Currently, elm_widget_sub_object_add() does not check if obj and sobj
> are same object.
> Actually it is a user problem if user add object itself as it's sub
object.
> But I think that this checking is needed and it is better to give
> error logs to users.  Because it causes infinite loop and it is hart
> to debugging.  :(
>
> Thanks.

SVN revision: 69995
This commit is contained in:
Daniel Juyung Seo 2012-04-10 09:47:19 +00:00
parent 6aa59c922d
commit e8cad72816
1 changed files with 1 additions and 0 deletions

View File

@ -922,6 +922,7 @@ elm_widget_sub_object_add(Evas_Object *obj,
Evas_Object *sobj)
{
API_ENTRY return;
EINA_SAFETY_ON_TRUE_RETURN(obj == sobj);
double scale, pscale = elm_widget_scale_get(sobj);
Elm_Theme *th, *pth = elm_widget_theme_get(sobj);
Eina_Bool mirrored, pmirrored = elm_widget_mirrored_get(obj);