summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJihoon Kim <jihoon48.kim@samsung.com>2013-12-31 11:36:43 +0900
committerJihoon Kim <jihoon48.kim@samsung.com>2013-12-31 11:36:43 +0900
commit90e29827c5980dee077d6b61999ed771a54393c7 (patch)
tree88fd244869d686ba632cb26022e4b211b719a638 /src
parent202b1a927f6c51d9ca43cb5d0495d2b8b66679b6 (diff)
downloadelementary-90e29827c5980dee077d6b61999ed771a54393c7.tar.gz
image: add NULL check
Diffstat (limited to 'src')
-rw-r--r--src/lib/elm_image.c34
1 files changed, 18 insertions, 16 deletions
diff --git a/src/lib/elm_image.c b/src/lib/elm_image.c
index d63de005f..981b834a3 100644
--- a/src/lib/elm_image.c
+++ b/src/lib/elm_image.c
@@ -254,6 +254,8 @@ _elm_image_smart_smooth_scale_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
Elm_Image_Smart_Data *sd = _pd;
+ if (!ret) return;
+
if (sd->edje)
{
*ret = EINA_FALSE;
@@ -286,7 +288,7 @@ _elm_image_smart_fill_inside_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
Elm_Image_Smart_Data *sd = _pd;
- *ret = sd->fill_inside;
+ if (ret) *ret = sd->fill_inside;
}
static void
@@ -313,7 +315,7 @@ _elm_image_smart_resize_up_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
Elm_Image_Smart_Data *sd = _pd;
- *ret = sd->resize_up;
+ if (ret) *ret = sd->resize_up;
}
static void
@@ -338,7 +340,7 @@ _elm_image_smart_resize_down_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
Elm_Image_Smart_Data *sd = _pd;
- *ret = sd->resize_up;
+ if (ret) *ret = sd->resize_up;
}
static void
@@ -803,7 +805,7 @@ _elm_image_smart_scale_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
Elm_Image_Smart_Data *sd = _pd;
double *ret = va_arg(*list, double *);
- *ret = sd->scale;
+ if (ret) *ret = sd->scale;
}
EAPI Evas_Object *
@@ -1088,7 +1090,7 @@ _elm_image_smart_smooth_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
{
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
Elm_Image_Smart_Data *sd = _pd;
- *ret = sd->smooth;
+ if (ret) *ret = sd->smooth;
}
EAPI void
@@ -1166,7 +1168,7 @@ _elm_image_smart_no_scale_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
{
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
Elm_Image_Smart_Data *sd = _pd;
- *ret = sd->no_scale;
+ if (ret) *ret = sd->no_scale;
}
EAPI void
@@ -1244,7 +1246,7 @@ _elm_image_smart_fill_outside_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
Elm_Image_Smart_Data *sd = _pd;
- *ret = !sd->fill_inside;
+ if (ret) *ret = !sd->fill_inside;
}
EAPI void
@@ -1311,7 +1313,7 @@ _elm_image_smart_load_size_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
int *ret = va_arg(*list, int *);
- *ret = sd->load_size;
+ if (ret) *ret = sd->load_size;
}
EAPI void
@@ -1451,7 +1453,7 @@ _elm_image_smart_orient_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
Elm_Image_Orient *ret = va_arg(*list, Elm_Image_Orient *);
- *ret = sd->orient;
+ if (ret) *ret = sd->orient;
}
EAPI void
@@ -1516,7 +1518,7 @@ _elm_image_smart_editable_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
Elm_Image_Smart_Data *sd = _pd;
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
- *ret = sd->edit;
+ if (ret) *ret = sd->edit;
}
EAPI Evas_Object *
@@ -1536,7 +1538,7 @@ _elm_image_smart_object_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
Elm_Image_Smart_Data *sd = _pd;
- *ret = sd->img;
+ if (ret) *ret = sd->img;
}
EAPI void
@@ -1576,7 +1578,7 @@ _elm_image_smart_aspect_fixed_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
Elm_Image_Smart_Data *sd = _pd;
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
- *ret = sd->aspect_fixed;
+ if (ret) *ret = sd->aspect_fixed;
}
EAPI Eina_Bool
@@ -1597,11 +1599,11 @@ _elm_image_smart_animated_available_get(Eo *obj, void *_pd, va_list *list)
if (sd->edje)
{
- *ret = EINA_FALSE;
+ if (ret) *ret = EINA_FALSE;
return;
}
- *ret = evas_object_image_animated_get(elm_image_object_get(obj));
+ if (ret) *ret = evas_object_image_animated_get(elm_image_object_get(obj));
}
EAPI void
@@ -1660,7 +1662,7 @@ _elm_image_smart_animated_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
{
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
Elm_Image_Smart_Data *sd = _pd;
- *ret = sd->anim;
+ if (ret) *ret = sd->anim;
}
EAPI void
@@ -1708,7 +1710,7 @@ _elm_image_smart_animated_play_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list
{
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
Elm_Image_Smart_Data *sd = _pd;
- *ret = sd->play;
+ if (ret) *ret = sd->play;
}
static void