- avoid divide by zero with node progress
- write_crash_blend() was writing to the original path.
This commit is contained in:
@@ -2465,7 +2465,7 @@ void ntreeCompositExecTree(bNodeTree *ntree, RenderData *rd, int do_preview)
|
||||
node= getExecutableNode(ntree);
|
||||
if(node) {
|
||||
|
||||
if(ntree->progress)
|
||||
if(ntree->progress && totnode)
|
||||
ntree->progress(ntree->prh, (1.0 - curnode/(float)totnode));
|
||||
if(ntree->stats_draw) {
|
||||
char str[64];
|
||||
|
||||
@@ -539,7 +539,7 @@ int write_crash_blend(void)
|
||||
char path[FILE_MAX];
|
||||
BLI_strncpy(path, G.sce, sizeof(path));
|
||||
BLI_replace_extension(path, sizeof(path), "_crash.blend");
|
||||
if(BLO_write_file(G.main, G.sce, G.fileflags, NULL, NULL)) {
|
||||
if(BLO_write_file(G.main, path, G.fileflags, NULL, NULL)) {
|
||||
printf("written: %s\n", path);
|
||||
return 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user