From 3b0832dd869b4c27f0b976e36134332cf427430c Mon Sep 17 00:00:00 2001
From: Campbell Barton <ideasman42@gmail.com>
Date: Wed, 26 Mar 2014 13:56:07 +1100
Subject: [PATCH] Fix T39279: Vertex paint fails with mirror modifier

---
 source/blender/editors/sculpt_paint/paint_vertex_proj.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/source/blender/editors/sculpt_paint/paint_vertex_proj.c b/source/blender/editors/sculpt_paint/paint_vertex_proj.c
index a04e15d3729..ae729248f7e 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex_proj.c
+++ b/source/blender/editors/sculpt_paint/paint_vertex_proj.c
@@ -153,6 +153,10 @@ static void vpaint_proj_dm_map_cosnos_update__map_cb(void *userData, int index,
 
 			vp_handle->dists_sq[index] = dist_sq;
 		}
+		else if (vp_handle->dists_sq[index] != FLT_MAX) {
+			/* already initialized & couldn't project this 'co' */
+			return;
+		}
 	}
 	/* continue with regular functionality */
 
-- 
GitLab