]> git.lyx.org Git - lyx.git/blobdiff - src/support/LAssert.C
Create a grfx::Loader class and so move large chunks of code out of
[lyx.git] / src / support / LAssert.C
index 8232b8d999b647df7542ac7d95bda1974dd2d6fb..ab0e6da223a0e93d738d47a0ee86841f4005a430 100644 (file)
@@ -1,8 +1,8 @@
 /* This file is part of
  * ======================================================
- * 
+ *
  *           LyX, The Document Processor
- *      
+ *
  *         Copyright 1995 Matthias Ettrich
  *          Copyright 1995-2001 The LyX Team.
  *
 #include "LAssert.h"
 
 #ifdef ENABLE_ASSERTIONS
-#include "bufferlist.h"
-
-extern BufferList bufferlist;
+#include "lyx_main.h"
 
-void emergencySave() {
-       static bool didSafe = false;
-       if (didSafe)
+void emergencyCleanup() {
+       static bool didCleanup;
+       if (didCleanup)
                return;
 
-       didSafe = true;
+       didCleanup = true;
 
-       // emergency save
-       if (!bufferlist.empty())
-               bufferlist.emergencyWriteAll();
+       LyX::emergencyCleanup();
 }
 
 #endif