diff options
author | Campbell Barton <ideasman42@gmail.com> | 2007-10-26 00:30:18 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2007-10-26 00:30:18 +0400 |
commit | fd98d38672ba4339e9ebb31d5d54e40e3dde045a (patch) | |
tree | d7ac6646c02cccbaac665074a22fa68b5af209a4 /source/blender/blenkernel/intern | |
parent | 5007d9557229a83cca7cba32f9162be73ea1dbdb (diff) |
fix for valgrind warning - strcpy was trying to copy to/from the same value (aparently this can corrupt the value in some cases)
Fixed problem where hidden curve handles could still be transformed.
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/blender.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c index cad8d3b0861..9d86b86a47f 100644 --- a/source/blender/blenkernel/intern/blender.c +++ b/source/blender/blenkernel/intern/blender.c @@ -409,8 +409,9 @@ static void setup_app_data(BlendFileData *bfd, char *filename) /* there's an onload scriptlink to execute in screenmain */ mainqenter(ONLOAD_SCRIPT, 1); } - - strcpy(G.sce, filename); + if (G.sce != filename) /* these are the same at times, should never copy to the same location */ + strcpy(G.sce, filename); + strcpy(G.main->name, filename); /* is guaranteed current file */ MEM_freeN(bfd); |