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:
authorSergey Sharybin <sergey.vfx@gmail.com>2018-11-18 17:56:14 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-11-18 17:56:57 +0300
commit5e61fd7c232ac2ece94c57ca74bebd2c91102f13 (patch)
treea7419b37b46eab769c823836a8427d6228501bae /source/blender/blenkernel/intern/material.c
parentbbd4613ed94931cd5443309d98ab8e112b64b93a (diff)
Fix T57896: Crash updating grease pencil material preview
Diffstat (limited to 'source/blender/blenkernel/intern/material.c')
-rw-r--r--source/blender/blenkernel/intern/material.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c
index 0e64b9dd6d0..6741ebf39d2 100644
--- a/source/blender/blenkernel/intern/material.c
+++ b/source/blender/blenkernel/intern/material.c
@@ -244,7 +244,10 @@ Material *BKE_material_localize(Material *ma)
man->nodetree = ntreeLocalize(ma->nodetree);
}
- /* man->gp_style = NULL; */ /* XXX: We probably don't want to clear here, or else we may get problems with COW later? */
+ if (ma->gp_style != NULL) {
+ man->gp_style = MEM_dupallocN(ma->gp_style);
+ }
+
BLI_listbase_clear(&man->gpumaterial);
/* TODO Duplicate Engine Settings and set runtime to NULL */