elm: fix dereferencing issue and add error handling and remove unreachable codes. accepted/tizen/unified/20190201.061426 submit/tizen/20190131.061936
authorMyoungwoon Roy, Kim <myoungwoon.kim@samsung.com>
Wed, 30 Jan 2019 19:54:36 +0000 (14:54 -0500)
committerTaehyub Kim <taehyub.kim@samsung.com>
Thu, 31 Jan 2019 03:45:42 +0000 (12:45 +0900)
Summary:
I had fixed dereferencing issue and added chmod error handling(elm_code_file)
I had removed unreachable codes which remains after changing arguments initiallization(efl_ui_win)

Test Plan: Run unit test cases

Reviewers: eagleeye, Jaehyun_Cho, Hermet, zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7816

src/lib/elementary/elm_code_file.c

index 1ca3e00..16c36cf 100644 (file)
@@ -121,6 +121,8 @@ EAPI Elm_Code_File *elm_code_file_new(Elm_Code *code)
 
 EAPI Elm_Code_File *elm_code_file_open(Elm_Code *code, const char *path)
 {
+   EINA_SAFETY_ON_NULL_RETURN_VAL(code, NULL);
+
    Elm_Code_File *ret;
    Eina_File *file;
    Eina_File_Line *line;