From 8ab6ef30ab28e6c73fc9309c0b21ddbc1cd3afc9 Mon Sep 17 00:00:00 2001 From: Richard Antalik Date: Sat, 2 Nov 2019 20:29:59 -0700 Subject: 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 --- source/blender/editors/space_sequencer/sequencer_edit.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'source/blender/editors/space_sequencer') diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c index 865dfb45278..ca1c55b80eb 100644 --- a/source/blender/editors/space_sequencer/sequencer_edit.c +++ b/source/blender/editors/space_sequencer/sequencer_edit.c @@ -177,7 +177,7 @@ static void proxy_endjob(void *pjv) WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, pj->scene); } -static void seq_proxy_build_job(const bContext *C) +static void seq_proxy_build_job(const bContext *C, ReportList *reports) { wmJob *wm_job; ProxyJob *pj; @@ -216,8 +216,12 @@ static void seq_proxy_build_job(const bContext *C) file_list = BLI_gset_new(BLI_ghashutil_strhash_p, BLI_ghashutil_strcmp, "file list"); SEQP_BEGIN (ed, seq) { if ((seq->flag & SELECT)) { - BKE_sequencer_proxy_rebuild_context( + bool success = BKE_sequencer_proxy_rebuild_context( pj->main, pj->depsgraph, pj->scene, seq, file_list, &pj->queue); + if (!success) { + + BKE_reportf(reports, RPT_ERROR, "Could not build proxy for strip %s", &seq->name); + } } } SEQ_END; @@ -3608,10 +3612,10 @@ void SEQUENCER_OT_view_ghost_border(wmOperatorType *ot) /* rebuild_proxy operator */ static int sequencer_rebuild_proxy_invoke(bContext *C, - wmOperator *UNUSED(op), + wmOperator *op, const wmEvent *UNUSED(event)) { - seq_proxy_build_job(C); + seq_proxy_build_job(C, op->reports); return OPERATOR_FINISHED; } -- cgit v1.2.3