summaryrefslogtreecommitdiff
path: root/src/debug.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/debug.cpp')
-rw-r--r--src/debug.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/debug.cpp b/src/debug.cpp
index 3761e416d..8647160b1 100644
--- a/src/debug.cpp
+++ b/src/debug.cpp
@@ -37,6 +37,10 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "filesys.h"
#endif
+#if USE_CURSES
+ #include "terminal_chat_console.h"
+#endif
+
/*
Assert
*/
@@ -44,6 +48,10 @@ with this program; if not, write to the Free Software Foundation, Inc.,
void sanity_check_fn(const char *assertion, const char *file,
unsigned int line, const char *function)
{
+#if USE_CURSES
+ g_term_console.stopAndWaitforThread();
+#endif
+
errorstream << std::endl << "In thread " << std::hex
<< thr_get_current_thread_id() << ":" << std::endl;
errorstream << file << ":" << line << ": " << function
@@ -57,6 +65,10 @@ void sanity_check_fn(const char *assertion, const char *file,
void fatal_error_fn(const char *msg, const char *file,
unsigned int line, const char *function)
{
+#if USE_CURSES
+ g_term_console.stopAndWaitforThread();
+#endif
+
errorstream << std::endl << "In thread " << std::hex
<< thr_get_current_thread_id() << ":" << std::endl;
errorstream << file << ":" << line << ": " << function