use custom allocation errors handler
This commit is contained in:
parent
636c3ac90e
commit
5017da5fe4
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user