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
path: root/source
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2017-05-27 15:46:14 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2017-05-27 15:46:14 +0300
commit275e2fb0ff6e62b462cf8d56f167d128da7bb27a (patch)
tree5ab386e073e904cb01b7fa9535b581663bd0ab9b /source
parent7df5ed14b1b8a2699280072b6a5f0cefb3749935 (diff)
Fix T51637: Mesh Tools - Noise Button Crashes.
Logic behind which mtext to use from material was broken here... Though ultimately that whole tool could probably be deprecated or reworked!
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/mesh/editmesh_tools.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c
index 65ee097e8e1..1f90b60a1f5 100644
--- a/source/blender/editors/mesh/editmesh_tools.c
+++ b/source/blender/editors/mesh/editmesh_tools.c
@@ -5235,8 +5235,10 @@ static int edbm_noise_exec(bContext *C, wmOperator *op)
else {
BM_ITER_MESH (eve, &iter, em->bm, BM_VERTS_OF_MESH) {
if (BM_elem_flag_test(eve, BM_ELEM_SELECT)) {
- float tin, dum;
- externtex(ma->mtex[0], eve->co, &tin, &dum, &dum, &dum, &dum, 0, NULL, false, false);
+ float tin = 0.0f, dum;
+ if (ma->mtex[ma->texact] != NULL) {
+ externtex(ma->mtex[ma->texact], eve->co, &tin, &dum, &dum, &dum, &dum, 0, NULL, false, false);
+ }
eve->co[2] += fac * tin;
}
}