From 865d5b540889e965c5c5fe0262e437a416996c76 Mon Sep 17 00:00:00 2001 From: Mirek Fidler Date: Tue, 19 Nov 2024 13:45:33 +0100 Subject: [PATCH] bad_alloc in thread --- uppsrc/Core/Mt.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/uppsrc/Core/Mt.cpp b/uppsrc/Core/Mt.cpp index 33b5f3d41..ee69d9b44 100644 --- a/uppsrc/Core/Mt.cpp +++ b/uppsrc/Core/Mt.cpp @@ -94,6 +94,10 @@ sThreadRoutine(void *arg) } catch(sThreadExitExc__) {} catch(Upp::ExitExc) {} + catch(std::bad_alloc) { + extern char out_of_memory_message[200]; + Panic(out_of_memory_message); + } if(!p->noshutdown) AtomicDec(sThreadCount); delete p;