]> git.lizzy.rs Git - minetest.git/blobdiff - src/debug.cpp
Mapgen: Remove '#include treegen.h' from non-mgv6 mapgens
[minetest.git] / src / debug.cpp
index 3761e416d5c0b2ef4bbf7ace693b2cb086121a75..8647160b1bed7c20cae3dae6e035bfc23bef521e 100644 (file)
@@ -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