fix error handling in edje_decc

fix CID 1039341
This commit is contained in:
Carsten Haitzler 2014-08-27 17:49:29 +09:00
parent a427fc46f7
commit 7e3367d82c
1 changed files with 6 additions and 2 deletions

View File

@ -562,8 +562,12 @@ output(void)
exit(-1);
}
f = fopen(out1, "wb");
if (fwrite(data, data_size, 1, f) != 1)
ERR("Could not write sound: %s", strerror(errno));
if (f)
{
if (fwrite(data, data_size, 1, f) != 1)
ERR("Could not write sound: %s", strerror(errno));
}
else ERR("Could not open for writing sound: %s: %s", out1, strerror(errno));
fclose(f);
}
}