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:
authorBastien Montagne <montagne29@wanadoo.fr>2018-06-05 16:10:33 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2018-06-05 17:33:46 +0300
commit481cdb08ed6f33a09d0e6843d1024db93c301178 (patch)
tree77166d130bfff2d5dca884676aaeff6bc0758f96 /source/blender/blenkernel/intern/blender_undo.c
parent1d97e948d2c4867306e7fb5ce5fccf8b72c13391 (diff)
Cleanup: use new accessors to blendfile path (Main.name).
Diffstat (limited to 'source/blender/blenkernel/intern/blender_undo.c')
-rw-r--r--source/blender/blenkernel/intern/blender_undo.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/blender_undo.c b/source/blender/blenkernel/intern/blender_undo.c
index 6b31c8c96f9..c3306b16041 100644
--- a/source/blender/blenkernel/intern/blender_undo.c
+++ b/source/blender/blenkernel/intern/blender_undo.c
@@ -66,10 +66,11 @@
bool BKE_memfile_undo_decode(MemFileUndoData *mfu, bContext *C)
{
- char mainstr[sizeof(G.main->name)];
+ Main *bmain = CTX_data_main(C);
+ char mainstr[sizeof(bmain->name)];
int success = 0, fileflags;
- BLI_strncpy(mainstr, G.main->name, sizeof(mainstr)); /* temporal store */
+ BLI_strncpy(mainstr, BKE_main_blendfile_path(bmain), sizeof(mainstr)); /* temporal store */
fileflags = G.fileflags;
G.fileflags |= G_FILE_NO_UI;
@@ -82,7 +83,7 @@ bool BKE_memfile_undo_decode(MemFileUndoData *mfu, bContext *C)
}
/* restore */
- BLI_strncpy(G.main->name, mainstr, sizeof(G.main->name)); /* restore */
+ BLI_strncpy(bmain->name, mainstr, sizeof(bmain->name)); /* restore */
G.fileflags = fileflags;
if (success) {