forked from bartvdbraak/blender
coverity issues:
CID: 478 Checker: REVERSE_INULL (help) File: base/src/source/blender/blenkernel/intern/softbody.c Function: apply_spring_memory Description: Pointer "sb" dereferenced before NULL check and CID: 480 Checker: REVERSE_INULL (help) File: base/src/source/blender/blenkernel/intern/softbody.c Function: springs_from_particles Description: Pointer "ob" dereferenced before NULL check again moved assignment after check to make sure pointer is valid. Kent
This commit is contained in:
parent
010a9c0b00
commit
c5b05fd450
@ -3075,8 +3075,8 @@ static void apply_spring_memory(Object *ob)
|
|||||||
int a;
|
int a;
|
||||||
float b,l,r;
|
float b,l,r;
|
||||||
|
|
||||||
b = sb->plastic;
|
|
||||||
if (sb && sb->totspring){
|
if (sb && sb->totspring){
|
||||||
|
b = sb->plastic;
|
||||||
for(a=0; a<sb->totspring; a++) {
|
for(a=0; a<sb->totspring; a++) {
|
||||||
bs = &sb->bspring[a];
|
bs = &sb->bspring[a];
|
||||||
bp1 =&sb->bpoint[bs->v1];
|
bp1 =&sb->bpoint[bs->v1];
|
||||||
@ -3546,9 +3546,9 @@ static void springs_from_particles(Object *ob)
|
|||||||
int a,k;
|
int a,k;
|
||||||
float hairmat[4][4];
|
float hairmat[4][4];
|
||||||
|
|
||||||
psys= ob->soft->particles;
|
if(ob && ob->soft && ob->soft->particles) {
|
||||||
sb= ob->soft;
|
psys= ob->soft->particles;
|
||||||
if(ob && sb && psys) {
|
sb= ob->soft;
|
||||||
psmd = psys_get_modifier(ob, psys);
|
psmd = psys_get_modifier(ob, psys);
|
||||||
|
|
||||||
bp= sb->bpoint;
|
bp= sb->bpoint;
|
||||||
|
Loading…
Reference in New Issue
Block a user