summaryrefslogtreecommitdiff
path: root/indra/llcommon/llerror.h
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2023-10-26 10:01:52 +0800
committerErik Kundiman <erik@megapahit.org>2023-10-26 10:01:52 +0800
commit281ca5330e5e1b46268a0bea68af1cdb4270d512 (patch)
tree16d00c08fe3484bdd6f2e376efeadda340e1c582 /indra/llcommon/llerror.h
parent92fedbc11e2d69bd51660e24956984cf2503ec71 (diff)
parent3ecce24f9f1a930f9765920a2818e5f5081d696c (diff)
Merge remote-tracking branch 'secondlife/DRTVWR-559' into DRTVWR-559
Diffstat (limited to 'indra/llcommon/llerror.h')
-rw-r--r--indra/llcommon/llerror.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/indra/llcommon/llerror.h b/indra/llcommon/llerror.h
index f229b4964a..05dd88ee51 100644
--- a/indra/llcommon/llerror.h
+++ b/indra/llcommon/llerror.h
@@ -385,11 +385,9 @@ typedef LLError::NoClassInfo _LL_CLASS_TO_LOG;
#define LL_NEWLINE '\n'
// Use this only in LL_ERRS or in a place that LL_ERRS may not be used
-#define LLERROR_CRASH \
-{ \
- int* make_me_crash = NULL;\
- *make_me_crash = 0; \
- exit(*make_me_crash); \
+#define LLERROR_CRASH \
+{ \
+ crashdriver([](int* ptr){ *ptr = 0; exit(*ptr); }); \
}
#define LL_ENDL \
@@ -491,4 +489,7 @@ LL_DEBUGS("SomeTag") performs the locking and map-searching ONCE, then caches
the result in a static variable.
*/
+// used by LLERROR_CRASH
+void crashdriver(void (*)(int*));
+
#endif // LL_LLERROR_H