Fixed a possible segfault when file doesn't exists.

SVN revision: 40155
This commit is contained in:
Rafael Antognolli 2009-04-17 23:31:41 +00:00
parent 17e4571dff
commit 59ac58e4ca
1 changed files with 4 additions and 2 deletions

View File

@ -206,9 +206,11 @@ main(int argc, char *argv[])
if (ef && arg_index < argc)
thumb_key = argv[arg_index];
ethumb_file_thumb_path_set(ef, thumb_path, thumb_key);
if (ef)
ethumb_file_generate(ef);
{
ethumb_file_thumb_path_set(ef, thumb_path, thumb_key);
ethumb_file_generate(ef);
}
ethumb_file_free(ef);
ethumb_free(e);