mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-19 19:33:47 +00:00
FIX: Direct crash when bad_alloc
Change-Id: If8e26218efa1750a7cbdced4f4b7db19d3a14db0
This commit is contained in:
@@ -3014,6 +3014,10 @@ extern "C" {
|
|||||||
//AddVectoredExceptionHandler(1, CBaseException::UnhandledExceptionFilter);
|
//AddVectoredExceptionHandler(1, CBaseException::UnhandledExceptionFilter);
|
||||||
SET_DEFULTER_HANDLER();
|
SET_DEFULTER_HANDLER();
|
||||||
#endif
|
#endif
|
||||||
|
std::set_new_handler([]() {
|
||||||
|
int *a = nullptr;
|
||||||
|
*a = 0;
|
||||||
|
});
|
||||||
// Call the UTF8 main.
|
// Call the UTF8 main.
|
||||||
return CLI().run(argc, argv_ptrs.data());
|
return CLI().run(argc, argv_ptrs.data());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user