From f791d74f102dcfed69a95d605e3c634f76a070ab Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 17 Nov 2010 04:02:19 +0000 Subject: writing single images from a render (own commit r33104), wasn't checking if the render was cancelled which would crash when writing the image. also remove paranoid checks for writing TAGA, Other formats - BMP, JPEG, Iris don't do this. --- source/blender/imbuf/intern/targa.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'source/blender/imbuf') diff --git a/source/blender/imbuf/intern/targa.c b/source/blender/imbuf/intern/targa.c index 89a69242a46..bc88f2bed0d 100644 --- a/source/blender/imbuf/intern/targa.c +++ b/source/blender/imbuf/intern/targa.c @@ -235,19 +235,12 @@ static int dumptarga(struct ImBuf * ibuf, FILE * file) int imb_savetarga(struct ImBuf * ibuf, char *name, int flags) { - char buf[20]; + char buf[20]= {0}; FILE *fildes; short ok = 0; (void)flags; /* unused */ - if (ibuf == 0) return (0); - if (ibuf->rect == 0) return (0); - - memset(buf,0,sizeof(buf)); - - /* buf[0] = 0; length string */ - buf[16] = (ibuf->depth + 0x7 ) & ~0x7; if (ibuf->depth > 8 ){ buf[2] = 10; -- cgit v1.2.3