]> 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 cd3050917a784b9e741d2278c7268f32dd77cb0c..ab0e6da223a0e93d738d47a0ee86841f4005a430 100644 (file)
@@ -1,10 +1,10 @@
 /* This file is part of
  * ======================================================
- * 
+ *
  *           LyX, The Document Processor
- *      
+ *
  *         Copyright 1995 Matthias Ettrich
- *          Copyright 1995-2000 The LyX Team.
+ *          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