]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
Fix a coverity false positive.
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 5 Mar 2015 11:26:10 +0000 (11:26 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 5 Mar 2015 11:26:10 +0000 (11:26 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12200 d7cf8633-e32d-0410-b094-e92efae38249

gl_rmain.c

index f69ac7b0d1c122443e9a30c7bfe9cc0b621b39b1..50fca5992bd3dab5b0a5def378e6c12f7779ba81 100644 (file)
@@ -6001,7 +6001,6 @@ void R_Water_AddWaterPlane(msurface_t *surface, int entno)
                }
        }
        planeindex = bestplaneindex;
-       p = r_fb.water.waterplanes + planeindex;
 
        // if this surface does not fit any known plane rendered this frame, add one
        if (planeindex < 0 || bestplanescore > 0.001f)
@@ -6028,6 +6027,7 @@ void R_Water_AddWaterPlane(msurface_t *surface, int entno)
        else
        {
                // merge mins/maxs when we're adding this surface to the plane
+               p = r_fb.water.waterplanes + planeindex;
                p->mins[0] = min(p->mins[0], mins[0]);
                p->mins[1] = min(p->mins[1], mins[1]);
                p->mins[2] = min(p->mins[2], mins[2]);