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:
authorKent Mein <mein@cs.umn.edu>2008-10-29 20:45:02 +0300
committerKent Mein <mein@cs.umn.edu>2008-10-29 20:45:02 +0300
commit4cee77b8224b149e2418a1b31acae752478c65c9 (patch)
tree20fb050e277bb9a82012493a89a115b5c5f02cad /source
parent22bcbc574265e9385b3dd59e28f063b716c338a7 (diff)
This is a fix for coverity issue CID: 517
Basically the code was referencing var[-1] it wasn't using it but also did not need to be set in those cases. So I moved the assignments so it skips the -1 case. Kent
Diffstat (limited to 'source')
-rw-r--r--source/blender/src/buttons_editing.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/src/buttons_editing.c b/source/blender/src/buttons_editing.c
index 45267f50622..f362fa815ce 100644
--- a/source/blender/src/buttons_editing.c
+++ b/source/blender/src/buttons_editing.c
@@ -5833,11 +5833,11 @@ void sculptmode_draw_interface_textures(uiBlock *block, unsigned short cx, unsig
for(i=-1; i<8; i++) {
char str[64];
int loos;
- mtex= sd->mtex[i];
if(i==-1)
strcpy(str, "Default");
else {
+ mtex= sd->mtex[i];
if(mtex && mtex->tex) splitIDname(mtex->tex->id.name+2, str, &loos);
else strcpy(str, "");
}
@@ -5848,12 +5848,12 @@ void sculptmode_draw_interface_textures(uiBlock *block, unsigned short cx, unsig
cy= orig_y-20;
cx+= 85;
- mtex= sd->mtex[sd->texact];
if(sd->texact == -1) {
uiBlockBeginAlign(block);
uiDefBut(block,LABEL,B_NOP,"",cx,cy,115,20,0,0,0,0,0,""); /* Padding */
} else {
+ mtex= sd->mtex[sd->texact];
ID *id= NULL;
uiBlockBeginAlign(block);