Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/imbuf/intern/targa.c')
-rw-r--r--source/blender/imbuf/intern/targa.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/imbuf/intern/targa.c b/source/blender/imbuf/intern/targa.c
index 4e6326a1fd6..c89bc6a632f 100644
--- a/source/blender/imbuf/intern/targa.c
+++ b/source/blender/imbuf/intern/targa.c
@@ -289,7 +289,10 @@ short imb_savetarga(struct ImBuf * ibuf, char *name, int flags)
fildes = fopen(name,"wb");
if (!fildes) return 0;
- if (fwrite(buf, 1, 18,fildes) != 18) return (0);
+ if (fwrite(buf, 1, 18,fildes) != 18) {
+ fclose(fildes);
+ return (0);
+ }
if (ibuf->cmap){
for (i = 0 ; i<ibuf->maxcol ; i++){