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:
authorKévin Dietrich <kevin.dietrich@mailoo.org>2016-08-06 13:43:37 +0300
committerKévin Dietrich <kevin.dietrich@mailoo.org>2016-08-06 13:43:52 +0300
commitb4cd289cdf78cc347a28b55b81272ec1be36c581 (patch)
treef4249f1ff78d6bbe33cee3e64ec7c5da5a707159 /source/blender
parent28c3bdf50bd62b510fdbd88a5dcb1c40f8726c20 (diff)
Fix T49028: crash when copying a scene without grease pencil data.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/editors/object/object_relations.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c
index ff2accf9d82..52fc07f3867 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;
+ }
}
}