mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-12 04:59:01 +08:00
Prevent hard crash in rare circumstances
This commit is contained in:
parent
0bd3112b7a
commit
c1e54675f5
@ -4,6 +4,7 @@
|
|||||||
#include "Job.hpp"
|
#include "Job.hpp"
|
||||||
|
|
||||||
#include <wx/utils.h>
|
#include <wx/utils.h>
|
||||||
|
#include <boost/log/trivial.hpp>
|
||||||
|
|
||||||
namespace Slic3r { namespace GUI {
|
namespace Slic3r { namespace GUI {
|
||||||
|
|
||||||
@ -16,7 +17,11 @@ struct CursorSetterRAII
|
|||||||
}
|
}
|
||||||
~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";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user