diff options
Diffstat (limited to 'wipesides.go')
-rw-r--r-- | wipesides.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/wipesides.go b/wipesides.go index 9183479..b9f5e5c 100644 --- a/wipesides.go +++ b/wipesides.go @@ -55,6 +55,9 @@ func findbestedge(img SummableImage, x int, w int) int { bestxs = append(bestxs, x) } } + if len(bestxs) == 0 { + return 0 + } middlex := bestxs[len(bestxs)/2] return middlex |