From 9fe27ad399d7781c5b5fc8c8b2828795ef24d0b1 Mon Sep 17 00:00:00 2001 From: ackimixs Date: Mon, 6 May 2024 13:27:04 +0200 Subject: [PATCH] handle crash --- arucoDetector.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arucoDetector.cpp b/arucoDetector.cpp index d302324..cc7f577 100644 --- a/arucoDetector.cpp +++ b/arucoDetector.cpp @@ -62,8 +62,10 @@ int main(int argc, char *argv[]) while (true) { + std::pair>>> r; + try { - auto r = detector.detectArucoTags({whiteFlower, purpleFlower, solarPanel}); + r = detector.detectArucoTags({whiteFlower, purpleFlower, solarPanel}); } catch (const std::exception& ex) { std::cerr << "Error: " << ex.what() << std::endl; return -1;