From c1e54675f53a100402b75a30b3061dd780d75955 Mon Sep 17 00:00:00 2001 From: tamasmeszaros Date: Mon, 21 Mar 2022 17:15:39 +0100 Subject: [PATCH] Prevent hard crash in rare circumstances --- src/slic3r/GUI/Jobs/BusyCursorJob.hpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/slic3r/GUI/Jobs/BusyCursorJob.hpp b/src/slic3r/GUI/Jobs/BusyCursorJob.hpp index 530213b1d5..8504d1eb93 100644 --- a/src/slic3r/GUI/Jobs/BusyCursorJob.hpp +++ b/src/slic3r/GUI/Jobs/BusyCursorJob.hpp @@ -4,6 +4,7 @@ #include "Job.hpp" #include +#include namespace Slic3r { namespace GUI { @@ -16,7 +17,11 @@ struct CursorSetterRAII } ~CursorSetterRAII() { - ctl.call_on_main_thread([] { wxEndBusyCursor(); }); + try { + ctl.call_on_main_thread([] { wxEndBusyCursor(); }); + } catch(...) { + BOOST_LOG_TRIVIAL(error) << "Can't revert cursor from busy to normal"; + } } };