Klocwork warning fix

Doing NULL pointer paranoia check in time.
It's completely pointless calling the function with null pointer,
but who knows.
At least it does not crash then.
This commit is contained in:
2006-12-02 18:42:20 +00:00
parent 93e920aea9
commit 08ef0d3466

View File

@@ -518,12 +518,12 @@ void ccd_update_deflector_hache(Object *vertexowner,GHash *hash)
Object *ob;
base= G.scene->base.first;
base= G.scene->base.first;
if (!hash) return;
if ((!hash) || (!vertexowner)) return;
while (base) {
/*Only proceed for mesh object in same layer */
if(base->object->type==OB_MESH && (base->lay & vertexowner->lay)) {
ob= base->object;
if((vertexowner) && (ob == vertexowner)){
if(ob == vertexowner){
/* if vertexowner is given we don't want to check collision with owner object */
base = base->next;
continue;