[Bf-blender-cvs] [8df6589585a] master: VSE: Fix crash when adding image strip

Richard Antalik noreply at git.blender.org
Thu Dec 17 02:38:27 CET 2020


Commit: 8df6589585a19efb7c9515bc40b81a55d43b3c9a
Author: Richard Antalik
Date:   Thu Dec 17 02:32:24 2020 +0100
Branches: master
https://developer.blender.org/rB8df6589585a19efb7c9515bc40b81a55d43b3c9a

VSE: Fix crash when adding image strip

Crash happens when using relative path to image in operator properties
and checking image dimensions by loading image with `IMB_loadiffname()`

Ensure path is absolute.

===================================================================

M	source/blender/sequencer/intern/strip_add.c

===================================================================

diff --git a/source/blender/sequencer/intern/strip_add.c b/source/blender/sequencer/intern/strip_add.c
index 9c9d51e9286..e56dcf888a7 100644
--- a/source/blender/sequencer/intern/strip_add.c
+++ b/source/blender/sequencer/intern/strip_add.c
@@ -121,6 +121,7 @@ Sequence *BKE_sequencer_add_image_strip(bContext *C, ListBase *seqbasep, SeqLoad
 
   char file_path[FILE_MAX];
   BLI_join_dirfile(file_path, sizeof(file_path), seq_load->path, seq_load->name);
+  BLI_path_abs(file_path, BKE_main_blendfile_path(CTX_data_main(C)));
   ImBuf *ibuf = IMB_loadiffname(file_path, IB_rect, seq->strip->colorspace_settings.name);
   if (ibuf != NULL) {
     SEQ_set_scale_to_fit(seq, ibuf->x, ibuf->y, scene->r.xsch, scene->r.ysch, seq_load->fit_method);



More information about the Bf-blender-cvs mailing list