devilhorns pushed a commit to branch master.

commit 204212131be862e87b69e83d5c322197e4c3a34a
Author: Chris Michael <[email protected]>
Date:   Fri Jun 28 13:48:21 2013 +0100

    Fix klockwork error: Null pointer may be dereferenced
    
    Check for valid out_file before trying to use it.
    
    Signed-off-by: Chris Michael <[email protected]>
---
 src/bin/edje/edje_pick.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/bin/edje/edje_pick.c b/src/bin/edje/edje_pick.c
index ea8a199..c0ea301 100644
--- a/src/bin/edje/edje_pick.c
+++ b/src/bin/edje/edje_pick.c
@@ -1347,8 +1347,9 @@ main(int argc, char **argv)
    _edje_pick_sound_dir_compose(samples, tones, out_file);
 
    /* Write file header after processing all groups */
-   bytes = eet_data_write(out_file->ef, _edje_edd_edje_file, "edje/file",
-                          out_file, comp_mode);
+   if (out_file)
+     bytes = eet_data_write(out_file->ef, _edje_edd_edje_file, "edje/file",
+                            out_file, comp_mode);
 
    VERBOSE(EINA_LOG_INFO("Wrote <%d> bytes for file header.\n", bytes));
 

-- 

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev

Reply via email to