[Bf-blender-cvs] [70380ef188e] greasepencil-object: Fix typos and crash on startup

Joshua Leung noreply at git.blender.org
Sat Nov 4 05:47:30 CET 2017


Commit: 70380ef188e0e6fc728cb4d62942e63c0f3f15b8
Author: Joshua Leung
Date:   Sun Oct 29 03:59:55 2017 +1300
Branches: greasepencil-object
https://developer.blender.org/rB70380ef188e0e6fc728cb4d62942e63c0f3f15b8

Fix typos and crash on startup

===================================================================

M	source/blender/blenloader/intern/versioning_280.c

===================================================================

diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c
index 22927892875..03ad060f95e 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -445,7 +445,7 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *main)
 		}
 		
 		/* Handle object-linked grease pencil datablocks */
-		for (Object *ob = main->scene.first; ob; ob = ob->id.next) {
+		for (Object *ob = main->object.first; ob; ob = ob->id.next) {
 			if (ob->gpd) {
 				if (ob->type == OB_GPENCIL) {
 					/* GP Object - remap the links */
@@ -458,7 +458,7 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *main)
 					 */
 					ob->data = ob->gpd;
 					ob->gpd = NULL;
-					ob->type = OB_EMPTY;
+					ob->type = OB_GPENCIL;
 				}
 				else {
 					/* FIXME: What to do in this case?



More information about the Bf-blender-cvs mailing list