mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-09 15:57:55 -06:00
FIX: Direct crash when bad_alloc
Change-Id: If8e26218efa1750a7cbdced4f4b7db19d3a14db0
This commit is contained in:
parent
ec94c46665
commit
f1a99020f6
1 changed files with 4 additions and 0 deletions
|
@ -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());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue