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");

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to