diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-05-31 17:04:04 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-05-31 17:04:04 +0300 |
commit | 16100f8261770e367b0892bb38c778699ed609fe (patch) | |
tree | 97232730f4680cd689cfa086c5434761c7dd33c7 /source/creator/creator_args.c | |
parent | b53d358261a26652d510d62565f1b43035a55e67 (diff) |
Cleanup: get rid of last G.main usages in BKE library code.
Diffstat (limited to 'source/creator/creator_args.c')
-rw-r--r-- | source/creator/creator_args.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/creator/creator_args.c b/source/creator/creator_args.c index 3da8a6bb898..971c2e84780 100644 --- a/source/creator/creator_args.c +++ b/source/creator/creator_args.c @@ -1732,8 +1732,9 @@ static int arg_handle_python_text_run(int argc, const char **argv, void *data) /* workaround for scripts not getting a bpy.context.scene, causes internal errors elsewhere */ if (argc > 1) { + Main *bmain = CTX_data_main(C); /* Make the path absolute because its needed for relative linked blends to be found */ - struct Text *text = (struct Text *)BKE_libblock_find_name(ID_TXT, argv[1]); + struct Text *text = (struct Text *)BKE_libblock_find_name(bmain, ID_TXT, argv[1]); bool ok; if (text) { |