From 3e115eb0565ed9599ccd81cdfb584d1ad3163ca8 Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Sat, 6 Jan 2018 15:15:35 +0100 Subject: [PATCH] In Etesian::AddFeed, do nothing if no feed of a suitable width is found. --- etesian/src/AddFeeds.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/etesian/src/AddFeeds.cpp b/etesian/src/AddFeeds.cpp index ac6d49df..c4056a1f 100644 --- a/etesian/src/AddFeeds.cpp +++ b/etesian/src/AddFeeds.cpp @@ -201,7 +201,9 @@ namespace { // Feed is too big, try to find a smaller one. int pitch = (int)((xmax-xtie) / getEtesian()->getVerticalPitch()); for ( ; pitch > 0 ; --pitch ) { - feed = getEtesian()->getFeedCells().getFeed( pitch ); + feed = getEtesian()->getFeedCells().getFeed( pitch ); + if (feed == NULL) continue; + feedWidth = feed->getAbutmentBox().getWidth(); if (feed != NULL) break; }