diff options
author | Richard Antalik <richardantalik@gmail.com> | 2019-11-03 06:29:59 +0300 |
---|---|---|
committer | Richard Antalik <richardantalik@gmail.com> | 2019-11-03 06:57:11 +0300 |
commit | 8ab6ef30ab28e6c73fc9309c0b21ddbc1cd3afc9 (patch) | |
tree | 3f8a11294984abeb94406c1ba6fc3cc662a844db /source/blender/blenkernel | |
parent | 93f93e6b45581659b0622f47526d538bdbd6ef33 (diff) |
Fix T68018: Crash on building movie proxy
Skip building proxy if directory can not be created.
Crash happens, when setting custom dir to location of source file itself.
This results in attempt to create directory with the same name as source file.
Differential Revision: https://developer.blender.org/D6148
Reviewed By: sergey
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/BKE_sequencer.h | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/sequencer.c | 13 |
2 files changed, 10 insertions, 5 deletions
diff --git a/source/blender/blenkernel/BKE_sequencer.h b/source/blender/blenkernel/BKE_sequencer.h index a5b223a73f2..c1bb60737ff 100644 --- a/source/blender/blenkernel/BKE_sequencer.h +++ b/source/blender/blenkernel/BKE_sequencer.h @@ -289,7 +289,7 @@ bool BKE_sequencer_input_have_to_preprocess(const SeqRenderData *context, struct Sequence *seq, float cfra); -void BKE_sequencer_proxy_rebuild_context(struct Main *bmain, +bool BKE_sequencer_proxy_rebuild_context(struct Main *bmain, struct Depsgraph *depsgraph, struct Scene *scene, struct Sequence *seq, diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c index 26dd9aab511..9f7dc8444ed 100644 --- a/source/blender/blenkernel/intern/sequencer.c +++ b/source/blender/blenkernel/intern/sequencer.c @@ -2093,7 +2093,7 @@ static int seq_proxy_context_count(Sequence *seq, Scene *scene) return num_views; } -void BKE_sequencer_proxy_rebuild_context(Main *bmain, +bool BKE_sequencer_proxy_rebuild_context(Main *bmain, Depsgraph *depsgraph, Scene *scene, Sequence *seq, @@ -2138,9 +2138,6 @@ void BKE_sequencer_proxy_rebuild_context(Main *bmain, context->view_id = i; /* only for images */ - link = BLI_genericNodeN(context); - BLI_addtail(queue, link); - if (nseq->type == SEQ_TYPE_MOVIE) { StripAnim *sanim; @@ -2155,8 +2152,16 @@ void BKE_sequencer_proxy_rebuild_context(Main *bmain, context->overwrite, file_list); } + if (!context->index_context) { + MEM_freeN(context); + return false; + } } + + link = BLI_genericNodeN(context); + BLI_addtail(queue, link); } + return true; } void BKE_sequencer_proxy_rebuild(SeqIndexBuildContext *context, |