elm_photocam: add NULL check 98/54698/1
authorSung-Taek Hong <sth253.hong@samsung.com>
Thu, 17 Dec 2015 07:55:43 +0000 (16:55 +0900)
committerSung-Taek Hong <sth253.hong@samsung.com>
Thu, 17 Dec 2015 07:55:45 +0000 (16:55 +0900)
elm_photocam: add NULL check

@fix

Reviewers: woohyun, jaehwan, eunue

Change-Id: I2f95e6b60644a624da896d4f7728f11d44b1d027
Signed-off-by: Sung-Taek Hong <sth253.hong@samsung.com>
src/lib/elm_photocam.c

index 90f9effff88b1e6a2e94c58b322e694f377b7278..10904c5bc4a8f9750014dfe07a25bf4a814ce788 100644 (file)
@@ -1832,6 +1832,9 @@ EAPI Evas_Load_Error
 elm_photocam_file_set(Elm_Photocam *obj, const char *file)
 {
    Eina_Bool ret;
+
+   ELM_PHOTOCAM_CHECK(obj) EVAS_LOAD_ERROR_NONE;
+   EINA_SAFETY_ON_NULL_RETURN_VAL(file, EVAS_LOAD_ERROR_NONE);
    if (eo_do_ret(obj, ret, efl_file_set(file, NULL))) return EVAS_LOAD_ERROR_NONE;
 
    Eina_Error err = eina_error_get();