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:
authorBastien Montagne <montagne29@wanadoo.fr>2018-06-01 18:08:38 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2018-06-01 18:08:38 +0300
commit051e186d5c61dccfc776b8da9b83c598421be4e7 (patch)
tree8f00c5a6262ca522fcd11a8540aee637a5aa8245 /source/blender/editors/space_sequencer/sequencer_edit.c
parent7c75c2db4f97e192d76761afe0cdb4391bdc0ec1 (diff)
Cleanup: some more G.main removal from editor code.
Diffstat (limited to 'source/blender/editors/space_sequencer/sequencer_edit.c')
-rw-r--r--source/blender/editors/space_sequencer/sequencer_edit.c5
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 0895d28fba7..a052b76e853 100644
--- a/source/blender/editors/space_sequencer/sequencer_edit.c
+++ b/source/blender/editors/space_sequencer/sequencer_edit.c
@@ -3885,13 +3885,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);