- dont forget to close the eet file.

SVN revision: 18908
This commit is contained in:
codewarrior 2005-12-08 08:03:58 +00:00 committed by codewarrior
parent d6e60edb82
commit 485c1f48b3
1 changed files with 5 additions and 0 deletions

View File

@ -153,6 +153,7 @@ e_thumb_geometry_get(char *file, int *w, int *h, int from_eet)
eet_file = _e_thumb_file_id(file); eet_file = _e_thumb_file_id(file);
if(!eet_file) if(!eet_file)
{ {
eet_close(ef);
if(w) *w = -1; if(w) *w = -1;
if(h) *h = -1; if(h) *h = -1;
return; return;
@ -160,6 +161,7 @@ e_thumb_geometry_get(char *file, int *w, int *h, int from_eet)
ef = eet_open(eet_file, EET_FILE_MODE_READ); ef = eet_open(eet_file, EET_FILE_MODE_READ);
if (!ef) if (!ef)
{ {
eet_close(ef);
if(w) *w = -1; if(w) *w = -1;
if(h) *h = -1; if(h) *h = -1;
return; return;
@ -170,6 +172,7 @@ e_thumb_geometry_get(char *file, int *w, int *h, int from_eet)
ef = eet_open(file, EET_FILE_MODE_READ); ef = eet_open(file, EET_FILE_MODE_READ);
if (!ef) if (!ef)
{ {
eet_close(ef);
if(w) *w = -1; if(w) *w = -1;
if(h) *h = -1; if(h) *h = -1;
return; return;
@ -178,10 +181,12 @@ e_thumb_geometry_get(char *file, int *w, int *h, int from_eet)
if(!eet_data_image_header_read(ef, "/thumbnail/data/", w, h, NULL, NULL, if(!eet_data_image_header_read(ef, "/thumbnail/data/", w, h, NULL, NULL,
NULL, NULL)) NULL, NULL))
{ {
eet_close(ef);
if(w) *w = -1; if(w) *w = -1;
if(h) *h = -1; if(h) *h = -1;
return; return;
} }
eet_close(ef);
} }
/* return true if the saved thumb exists OR if its an eap */ /* return true if the saved thumb exists OR if its an eap */