coverity issue CID: 228
authorKent Mein <mein@cs.umn.edu>
Sat, 13 Jun 2009 16:49:30 +0000 (16:49 +0000)
committerKent Mein <mein@cs.umn.edu>
Sat, 13 Jun 2009 16:49:30 +0000 (16:49 +0000)
Checker: DEADCODE (help)
File: base/src/source/blender/gpu/intern/gpu_material.c
Function: GPU_materials_free
Description: Conditional "ma != 0"

was looping over wrong variable I'm guessing a cut and
paste error from above.

Kent

source/blender/gpu/intern/gpu_material.c

index 818b67170c7c0980e4e0aa1745fb87f0f8d74ded..7e8b5c18d71a295eca805ff53837ad3a7e8b299a 100644 (file)
@@ -1285,7 +1285,7 @@ void GPU_materials_free()
 
        GPU_material_free(&defmaterial);
 
-       for(ob=G.main->object.first; ma; ma=ma->id.next)
+       for(ob=G.main->object.first; ob; ob=ob->id.next)
                GPU_lamp_free(ob);
 }