diff options
Diffstat (limited to 'source/blender/editors/space_sequencer/sequencer_edit.c')
-rw-r--r-- | source/blender/editors/space_sequencer/sequencer_edit.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c index d82028ef2c9..999e0fbf2a4 100644 --- a/source/blender/editors/space_sequencer/sequencer_edit.c +++ b/source/blender/editors/space_sequencer/sequencer_edit.c @@ -3865,13 +3865,14 @@ void SEQUENCER_OT_change_path(struct wmOperatorType *ot) static int sequencer_export_subtitles_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event)) { + Main *bmain = CTX_data_main(C); if (!RNA_struct_property_is_set(op->ptr, "filepath")) { char filepath[FILE_MAX]; - if (G.main->name[0] == 0) + if (bmain->name[0] == '\0') BLI_strncpy(filepath, "untitled", sizeof(filepath)); else - BLI_strncpy(filepath, G.main->name, sizeof(filepath)); + BLI_strncpy(filepath, bmain->name, sizeof(filepath)); BLI_replace_extension(filepath, sizeof(filepath), ".srt"); RNA_string_set(op->ptr, "filepath", filepath); |