From 466be7766d6191fee2135d3e484062f9aad2c16c Mon Sep 17 00:00:00 2001 From: zzyyyl Date: Mon, 2 Oct 2023 15:10:47 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20`templ=20size=20is?= =?UTF-8?q?=20too=20large`=20=E6=97=B6=E9=97=AA=E9=80=80=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix #6639 --- src/MaaCore/Vision/MultiMatcher.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/MaaCore/Vision/MultiMatcher.cpp b/src/MaaCore/Vision/MultiMatcher.cpp index a1ac881905..4bd776c9ff 100644 --- a/src/MaaCore/Vision/MultiMatcher.cpp +++ b/src/MaaCore/Vision/MultiMatcher.cpp @@ -15,6 +15,10 @@ using namespace asst; MultiMatcher::ResultsVecOpt MultiMatcher::analyze() const { auto match_results = Matcher::preproc_and_match(make_roi(m_image, m_roi), m_params); + if (match_results.empty()) { + return std::nullopt; + } + const auto& [matched, templ, templ_name] = match_results.front(); if (matched.empty()) {