summaryrefslogtreecommitdiff
path: root/indra/llcommon/llerror.h
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2023-10-25 21:31:05 +0300
committerAndrey Lihatskiy <alihatskiy@productengine.com>2023-10-25 21:31:05 +0300
commit98a431bd16e0e06f8f83b93fd232363403c6463b (patch)
tree0e0bc8bc1c5ab18fda8ff5ba948c13b530c8a6cf /indra/llcommon/llerror.h
parent69aa02d2e1873970302942487b96d3a6aca119e5 (diff)
parent2e8e96cfbcb383a667d1b938f364f0bbafcad5b4 (diff)
Merge branch 'main' into DRTVWR-591-maint-X
# Conflicts: # indra/newview/llinventorygallery.cpp
Diffstat (limited to 'indra/llcommon/llerror.h')
-rw-r--r--indra/llcommon/llerror.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/indra/llcommon/llerror.h b/indra/llcommon/llerror.h
index 020f05e8f5..624a5fb37a 100644
--- a/indra/llcommon/llerror.h
+++ b/indra/llcommon/llerror.h
@@ -383,11 +383,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 \
@@ -466,5 +464,7 @@ typedef LLError::NoClassInfo _LL_CLASS_TO_LOG;
// Check at run-time whether logging is enabled, without generating output
bool debugLoggingEnabled(const std::string& tag);
+// used by LLERROR_CRASH
+void crashdriver(void (*)(int*));
#endif // LL_LLERROR_H