]> git.lyx.org Git - lyx.git/blobdiff - src/support/LAssert.C
another safety belt
[lyx.git] / src / support / LAssert.C
index cd3050917a784b9e741d2278c7268f32dd77cb0c..233f743b85def9f706765d43ddeb03ad1323d03c 100644 (file)
@@ -1,12 +1,12 @@
-/* This file is part of
- * ======================================================
- * 
- *           LyX, The Document Processor
- *      
- *         Copyright 1995 Matthias Ettrich
- *          Copyright 1995-2000 The LyX Team.
+/**
+ * \file LAssert.C
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
  *
- * ====================================================== */
+ * \author Lars Gullik Bjønnes
+ *
+ * Full author contact details are available in file CREDITS
+ */
 
 #include <config.h>
 
 #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