diff --git a/opencog/query/Satisfier.cc b/opencog/query/Satisfier.cc index 095f1e34ab..473ab8ca14 100644 --- a/opencog/query/Satisfier.cc +++ b/opencog/query/Satisfier.cc @@ -59,7 +59,7 @@ bool Satisfier::search_finished(bool done) // If there were no variables to be grounded, we have nothing to do. if (not _have_variables) return done; - // If there was a grounding, then don't don't re-run; we're here + // If there was a grounding, then don't re-run; we're here // only to handle the no-groundings case. if (TruthValue::TRUE_TV() == _result) return done; @@ -67,6 +67,11 @@ bool Satisfier::search_finished(bool done) // was grounded. Ergo, its not the no-grounding case. if (_optionals_present) return done; + // Multi-component patterns will not have distinct bodies. + // A failure to match one of the components is benign, and is + // treated appropriately upstream. Just return. + if (nullptr == _pattern_body) return done; + // Evaluating the pattern body only makes sense if it is sequential // (ordered) -- if the body is an unordered AndLink, or if its a // ChoiceLink, etc, this makes no sense.