diff options
author | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2016-10-28 19:26:34 +0300 |
---|---|---|
committer | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2016-10-28 19:26:34 +0300 |
commit | 8a1b38f071dea64567fa9e3dac5ad98d7b2dc6a2 (patch) | |
tree | 7ece615a273a4a4abef34f09915c20514c2dcc11 /source/blender/editors/io | |
parent | 216dec7eb1ae22ed5c2ab11ce559e7862566026f (diff) |
Cleanup: avoid using G.main.
Diffstat (limited to 'source/blender/editors/io')
-rw-r--r-- | source/blender/editors/io/io_cache.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/editors/io/io_cache.c b/source/blender/editors/io/io_cache.c index c5eea94f5e1..ebe8898571d 100644 --- a/source/blender/editors/io/io_cache.c +++ b/source/blender/editors/io/io_cache.c @@ -59,7 +59,9 @@ static int cachefile_open_invoke(bContext *C, wmOperator *op, const wmEvent *eve { if (!RNA_struct_property_is_set(op->ptr, "filepath")) { char filepath[FILE_MAX]; - BLI_strncpy(filepath, G.main->name, sizeof(filepath)); + Main *bmain = CTX_data_main(C); + + BLI_strncpy(filepath, bmain->name, sizeof(filepath)); BLI_replace_extension(filepath, sizeof(filepath), ".abc"); RNA_string_set(op->ptr, "filepath", filepath); } |