Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Antalik <richardantalik@gmail.com>2021-05-25 16:02:31 +0300
committerRichard Antalik <richardantalik@gmail.com>2021-05-25 16:08:32 +0300
commit0f7becece7fd829f8ccb9c0fdcb5b929fc25fb70 (patch)
tree4b2d4b1f2d00de97f9033b8d1a7daefcfa2273fa /source/blender/editors/space_sequencer/sequencer_add.c
parent1a69d491e57cb7b7a834f265f59df3bd8f01e55b (diff)
Fix T88551: Crash accessing uninitialized tool settings
Tool settings for sequencer were not initialized, which caused crash when adding strips. There was fix for same issue in versioning rB0f81dafe6cec, but subversion was not bumped, so files with uninitialized tool settings may still exist. Add `SEQ_tool_settings_get()` accessor function that will initialize tool settings if they are missing. Change operator code to use `SEQ_tool_settings_fit_method_get()` function instead of accessing tool settings directly Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D11383
Diffstat (limited to 'source/blender/editors/space_sequencer/sequencer_add.c')
-rw-r--r--source/blender/editors/space_sequencer/sequencer_add.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_add.c b/source/blender/editors/space_sequencer/sequencer_add.c
index a61260acfb2..68c0f4f4bdb 100644
--- a/source/blender/editors/space_sequencer/sequencer_add.c
+++ b/source/blender/editors/space_sequencer/sequencer_add.c
@@ -1083,8 +1083,7 @@ static int sequencer_add_image_strip_invoke(bContext *C,
sequencer_disable_one_time_properties(C, op);
- const SequencerToolSettings *tool_settings = scene->toolsettings->sequencer_tool_settings;
- RNA_enum_set(op->ptr, "fit_method", tool_settings->fit_method);
+ RNA_enum_set(op->ptr, "fit_method", SEQ_tool_settings_fit_method_get(scene));
/* Name set already by drag and drop. */
if (RNA_struct_property_is_set(op->ptr, "files") && RNA_collection_length(op->ptr, "files")) {