use custom allocation errors handler

This commit is contained in:
Garux 2021-09-28 05:55:17 +03:00
parent 636c3ac90e
commit 5017da5fe4

View File

@ -39,6 +39,10 @@
static void new_handler(){
Error( "Memory allocation failed, terminating" );
}
/*
ExitQ3Map()
cleanup routine
@ -77,6 +81,9 @@ int main( int argc, char **argv ){
/* set exit call */
atexit( ExitQ3Map );
/* set allocation error callback */
std::set_new_handler( new_handler );
Args args( argc, argv );
/* read general options first */