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.
This commit is contained in:
2007-10-25 20:30:18 +00:00
parent 5007d95572
commit fd98d38672
2 changed files with 30 additions and 14 deletions

View File

@@ -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);