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:
Diffstat (limited to 'source/creator/creator_args.c')
-rw-r--r--source/creator/creator_args.c3
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) {