[Bf-blender-cvs] [b4cd289] master: Fix T49028: crash when copying a scene without grease pencil data.
Kévin Dietrich
noreply at git.blender.org
Sat Aug 6 12:43:56 CEST 2016
Commit: b4cd289cdf78cc347a28b55b81272ec1be36c581
Author: Kévin Dietrich
Date: Sat Aug 6 12:43:37 2016 +0200
Branches: master
https://developer.blender.org/rBb4cd289cdf78cc347a28b55b81272ec1be36c581
Fix T49028: crash when copying a scene without grease pencil data.
===================================================================
M source/blender/editors/object/object_relations.c
===================================================================
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c
index ff2accf..52fc07f 100644
--- a/source/blender/editors/object/object_relations.c
+++ b/source/blender/editors/object/object_relations.c
@@ -1764,10 +1764,13 @@ static void single_object_users(Main *bmain, Scene *scene, View3D *v3d, const in
/* copy already clears */
}
/* remap gpencil parenting */
- bGPdata *gpd = scene->gpd;
- for (bGPDlayer *gpl = gpd->layers.first; gpl; gpl = gpl->next) {
- if (gpl->parent == ob) {
- gpl->parent = obn;
+
+ if (scene->gpd) {
+ bGPdata *gpd = scene->gpd;
+ for (bGPDlayer *gpl = gpd->layers.first; gpl; gpl = gpl->next) {
+ if (gpl->parent == ob) {
+ gpl->parent = obn;
+ }
}
}
More information about the Bf-blender-cvs
mailing list