Fix klockwork error: Null pointer may be dereferenced

Check for valid out_file before trying to use it.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2013-06-28 13:48:21 +01:00
parent d92edb51a4
commit 204212131b
1 changed files with 3 additions and 2 deletions

View File

@ -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));