From f4947d5f705532c62a49b332b0cbf03f170f5469 Mon Sep 17 00:00:00 2001 From: EmaMaker Date: Wed, 4 Oct 2023 11:27:53 +0200 Subject: [PATCH] debugwindow: catch exception to avoid crash when missing parameters --- src/debugwindow.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/debugwindow.cpp b/src/debugwindow.cpp index 70ab802..f6e7977 100644 --- a/src/debugwindow.cpp +++ b/src/debugwindow.cpp @@ -121,7 +121,9 @@ namespace debug{ std::any_cast(parameters.at("update_chunks_bucket"))); } }catch(const std::bad_any_cast& e){ - std::cout << e.what(); + std::cout << e.what() << std::endl; + }catch(const std::out_of_range& e){ + std::cout << e.what() << std::endl; } ImGui::End();