diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-12-26 01:31:19 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-12-26 01:31:19 +0400 |
commit | 2cd5436a81da5c15ac70bd2b80c2f062cce5d02e (patch) | |
tree | 2cc12476fb3fa653042eef99fa6b5d4d8cb290ec /source/blender/python/generic/bpy_internal_import.c | |
parent | 4ced91da47ec1e95d71beef07b218fd0290ff68a (diff) | |
parent | 02d72b5c076f4ae1b47da74fe7a60a916edad9f2 (diff) |
svn merge ^/trunk/blender -r42839:42871
Diffstat (limited to 'source/blender/python/generic/bpy_internal_import.c')
-rw-r--r-- | source/blender/python/generic/bpy_internal_import.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/python/generic/bpy_internal_import.c b/source/blender/python/generic/bpy_internal_import.c index 88e2da16eb5..d9183261329 100644 --- a/source/blender/python/generic/bpy_internal_import.c +++ b/source/blender/python/generic/bpy_internal_import.c @@ -141,9 +141,10 @@ PyObject *bpy_text_import_name(const char *name, int *found) printf("ERROR: bpy_import_main_set() was not called before running python. this is a bug.\n"); return NULL; } - - if (namelen >= (MAX_ID_NAME-2) - 3) return NULL; /* we know this cant be importable, the name is too long for blender! */ - + + /* we know this cant be importable, the name is too long for blender! */ + if (namelen >= (MAX_ID_NAME-2) - 3) return NULL; + memcpy(txtname, name, namelen); memcpy(&txtname[namelen], ".py", 4); |