Skip to content
Snippets Groups Projects
Commit a006e158 authored by Guillaume Pasero's avatar Guillaume Pasero
Browse files

BUG: try to avoid segfault on adhesion correction filter

parent 76446f50
No related branches found
No related tags found
No related merge requests found
......@@ -632,7 +632,7 @@ AdhesionCorrectionFilter<TImage, TMask>
int l=-2-win;
index2[0] = index_pos[0] + i;
index2[1] = index_pos[1] + l;
while (old_maskPtr->GetPixel(index2) == 0)
while (old_maskPtr->GetBufferedRegion().IsInside(index2) && old_maskPtr->GetPixel(index2) == 0)
{
l++;
index2[1] = index_pos[1] + l;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment