Reading .blend from runtime closed file handle twice... seemed to crash in
authorTon Roosendaal <ton@blender.org>
Thu, 20 Jan 2005 10:33:11 +0000 (10:33 +0000)
committerTon Roosendaal <ton@blender.org>
Thu, 20 Jan 2005 10:33:11 +0000 (10:33 +0000)
windows? Weird, was a commit from april last year (Nathan) and nobody has
reported errors. (bug report 2155)

source/blender/readblenfile/intern/BLO_readblenfile.c

index 9b81b3bdd0d398608e1225a71e4ecbb733d57379..8199c83c3ef58c4faefdf3e22de46e48308b2b56 100644 (file)
@@ -163,6 +163,7 @@ blo_read_runtime(
                //printf("starting to read runtime from %s at datastart %d\n", path, datastart);
                lseek(fd, datastart, SEEK_SET);
                bfd = blo_read_blendafterruntime(fd, actualsize-datastart, error_r);
+               fd= -1; // file was closed in blo_read_blendafterruntime()
        }
        
 cleanup: