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:
authorAntonio Vazquez <blendergit@gmail.com>2019-11-29 13:22:36 +0300
committerAntonio Vazquez <blendergit@gmail.com>2019-11-29 13:25:16 +0300
commitbe1f4d875fb8001a10886a8577032e0f197827d3 (patch)
tree8fa739997e591216661e2838fe25319a6fb5e12d /source/blender/blenkernel/intern/material.c
parentb25bb2d7ec31ef08d67142ad655d59cd37e1d747 (diff)
Fix T72013: Gpencil Interpolate strokes causes instant crash when material list is empty
The problem was the draw function tried to use the material and gpsettings and both were NULL. Now, the default material is used.
Diffstat (limited to 'source/blender/blenkernel/intern/material.c')
-rw-r--r--source/blender/blenkernel/intern/material.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c
index 73c278a0ab6..54432c8da74 100644
--- a/source/blender/blenkernel/intern/material.c
+++ b/source/blender/blenkernel/intern/material.c
@@ -598,6 +598,11 @@ Material *BKE_material_gpencil_get(Object *ob, short act)
}
}
+struct Material *BKE_material_gpencil_default_get(void)
+{
+ return &defgpencil_material;
+}
+
MaterialGPencilStyle *BKE_material_gpencil_settings_get(Object *ob, short act)
{
Material *ma = give_current_material(ob, act);