diff options
Diffstat (limited to 'source/blender/avi/intern')
-rw-r--r-- | source/blender/avi/intern/avi.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/source/blender/avi/intern/avi.c b/source/blender/avi/intern/avi.c index cda2cf303eb..2845b2f95c9 100644 --- a/source/blender/avi/intern/avi.c +++ b/source/blender/avi/intern/avi.c @@ -734,16 +734,15 @@ AviError AVI_close(AviMovie *movie) fclose(movie->fp); - for (i = 0; movie->header && (i < movie->header->Streams); i++) { - if (movie->streams && (movie->streams[i].sf != NULL)) { + for (i = 0; i < movie->header->Streams; i++) { + if (movie->streams[i].sf != NULL) { MEM_freeN(movie->streams[i].sf); } } - if (movie->header != NULL) - MEM_freeN(movie->header); - if (movie->streams != NULL) - MEM_freeN(movie->streams); + MEM_freeN(movie->header); + MEM_freeN(movie->streams); + if (movie->entries != NULL) MEM_freeN(movie->entries); if (movie->offset_table != NULL) @@ -1082,15 +1081,15 @@ AviError AVI_close_compress(AviMovie *movie) fclose(movie->fp); - for (i = 0; movie->header && (i < movie->header->Streams); i++) { + for (i = 0; i < movie->header->Streams; i++) { if (movie->streams && (movie->streams[i].sf != NULL)) { MEM_freeN(movie->streams[i].sf); } } - if (movie->header != NULL) - MEM_freeN(movie->header); - if (movie->entries != NULL) - MEM_freeN(movie->entries); + + MEM_freeN(movie->header); + MEM_freeN(movie->entries); + if (movie->streams != NULL) MEM_freeN(movie->streams); if (movie->offset_table != NULL) |