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:
Diffstat (limited to 'source/blender/src/sculptmode.c')
-rw-r--r--source/blender/src/sculptmode.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/src/sculptmode.c b/source/blender/src/sculptmode.c
index c534a8b3cab..ca049523928 100644
--- a/source/blender/src/sculptmode.c
+++ b/source/blender/src/sculptmode.c
@@ -1175,7 +1175,7 @@ void sculptmode_update_tex()
{
SculptData *sd= sculpt_data();
SculptSession *ss= sculpt_session();
- MTex *mtex = sd->mtex[sd->texact];
+ MTex *mtex;
TexResult texres = {0};
float x, y, step=2.0/TC_SIZE, co[3];
int hasrgb, ix, iy;
@@ -1183,6 +1183,8 @@ void sculptmode_update_tex()
/* Skip Default brush shape and non-textures */
if(sd->texact == -1 || !sd->mtex[sd->texact]) return;
+ mtex = sd->mtex[sd->texact];
+
if(ss->texcache) {
MEM_freeN(ss->texcache);
ss->texcache= NULL;