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:
authorKent Mein <mein@cs.umn.edu>2009-03-24 22:39:02 +0300
committerKent Mein <mein@cs.umn.edu>2009-03-24 22:39:02 +0300
commit6020d2cb45322c0dfa3d9548cca62318b7a6491c (patch)
treebff876b71d5bbf00c5f4030adb0ae6d2d9fcea4c
parentc78b460fce4b1da228bd60809e281eea358cf2c9 (diff)
Changed missing line ending style for TEX_ files
in sculptmode.c move initalization of a var to fix an issue where index of array could be -1. Found by coverity. Kent
-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;