[Bf-blender-cvs] [45f7d11cc7f] hair_object: Check for valid scalp before running the test hair operator.
Lukas Toenne
noreply at git.blender.org
Sun Oct 28 19:24:47 CET 2018
Commit: 45f7d11cc7fa88d814cd2a98c12a38c3f075032b
Author: Lukas Toenne
Date: Sun Oct 28 14:08:10 2018 +0000
Branches: hair_object
https://developer.blender.org/rB45f7d11cc7fa88d814cd2a98c12a38c3f075032b
Check for valid scalp before running the test hair operator.
===================================================================
M source/blender/editors/hair/edithair_test.c
===================================================================
diff --git a/source/blender/editors/hair/edithair_test.c b/source/blender/editors/hair/edithair_test.c
index 6975d99f922..030870c4999 100644
--- a/source/blender/editors/hair/edithair_test.c
+++ b/source/blender/editors/hair/edithair_test.c
@@ -117,6 +117,10 @@ static int add_test_hair_exec(bContext *C, wmOperator *op)
HairSystem *hsys = obedit->data;
EditHair *edit = hsys->edithair;
struct Mesh *scalp = BKE_hair_get_scalp(depsgraph, obedit, hsys);
+ if (!scalp)
+ {
+ return OPERATOR_CANCELLED;
+ }
const int seed = RNA_int_get(op->ptr, "seed");
const int count = RNA_int_get(op->ptr, "count");
More information about the Bf-blender-cvs
mailing list