Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/render/intern/texture_margin.cc')
-rw-r--r--source/blender/render/intern/texture_margin.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/render/intern/texture_margin.cc b/source/blender/render/intern/texture_margin.cc
index bb4b82645f0..5a9d9db5367 100644
--- a/source/blender/render/intern/texture_margin.cc
+++ b/source/blender/render/intern/texture_margin.cc
@@ -349,13 +349,17 @@ class TextureMarginMap {
* But it seems fast enough for now and that would add a lot of complexity. */
for (int i = 0; i < totloop; i++) {
int otherloop = loop_adjacency_map_[i + loopstart];
+
+ if (otherloop < 0) {
+ continue;
+ }
+
uint32_t poly = loop_to_poly_map_[otherloop];
if (lookup_pixel(x, y, poly, &destx, &desty, &foundpoly, &found_dist)) {
if (mindist < 0.f || found_dist < mindist) {
mindist = found_dist;
*r_other_poly = foundpoly;
- ;
*r_destx = destx;
*r_desty = desty;
*r_start_poly = poly;