]> git.lyx.org Git - lyx.git/blobdiff - src/boost.C
Make enter button work in GTK text dialog
[lyx.git] / src / boost.C
index e4d3cf44ed293fc301943ff19854195cf39ccef4..10494e226ad8ed57d0d0c36101edfed264d08906 100644 (file)
@@ -12,6 +12,7 @@
 
 #include "lyx_main.h"
 #include "debug.h"
+#include "support/lyxlib.h"
 
 #include <boost/assert.hpp>
 
@@ -33,13 +34,13 @@ namespace {
 
 void emergencyCleanup()
 {
-        static bool didCleanup;
-        if (didCleanup)
-                return;
+       static bool didCleanup;
+       if (didCleanup)
+               return;
 
-        didCleanup = true;
+       didCleanup = true;
 
-        LyX::emergencyCleanup();
+       LyX::cref().emergencyCleanup();
 }
 
 }
@@ -48,10 +49,11 @@ void emergencyCleanup()
 void assertion_failed(char const * expr, char const * function,
                      char const * file, long line)
 {
-       lyxerr << "Assertion triggered in " << function << " by \"" <<
-               expr << " in file " << file << ":" << line << endl;
+       lyxerr << "Assertion triggered in " << function
+              << " by failing check \"" << expr << "\""
+              << " in file " << file << ":" << line << endl;
        emergencyCleanup();
-       assert(false);
+       lyx::support::abort();
 }