diff options
author | Kent Mein <mein@cs.umn.edu> | 2005-01-10 19:22:40 +0300 |
---|---|---|
committer | Kent Mein <mein@cs.umn.edu> | 2005-01-10 19:22:40 +0300 |
commit | 3c592ec3ad40cd3809890f3532875a609c635fb3 (patch) | |
tree | aef5e4a5a9779eda429b0ca4c3d21dc402ead55c /source/blender/imbuf/intern/bmp.c | |
parent | d1d8950eac2e0cbdbbf97e5b893f72a4fdca3b12 (diff) |
This is for bug # 2068
I standarized the returns on a failed opening of the output file for
the above image formats.
I also cleaned up a couple of warnings.
Kent
Diffstat (limited to 'source/blender/imbuf/intern/bmp.c')
-rw-r--r-- | source/blender/imbuf/intern/bmp.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/imbuf/intern/bmp.c b/source/blender/imbuf/intern/bmp.c index 004a01d0ded..31f2b66cd83 100644 --- a/source/blender/imbuf/intern/bmp.c +++ b/source/blender/imbuf/intern/bmp.c @@ -207,6 +207,7 @@ short imb_savebmp(struct ImBuf *ibuf, char *name, int flags) { data = (uchar *) ibuf->rect; ofile = fopen(name,"wb"); + if (!ofile) return 0; putShortLSB(19778,ofile); /* "BM" */ putIntLSB(0,ofile); /* This can be 0 for BI_RGB bitmaps */ |