]> git.lyx.org Git - lyx.git/blob - src/support/LAssert.C
Small things in my tree.
[lyx.git] / src / support / LAssert.C
1 /* This file is part of
2  * ======================================================
3  * 
4  *           LyX, The Document Processor
5  *       
6  *          Copyright 1995 Matthias Ettrich
7  *          Copyright 1995-2000 The LyX Team.
8  *
9  * ====================================================== */
10
11 #include <config.h>
12
13 #ifdef __GNUG__
14 #pragma implementation
15 #endif
16
17 #include "LAssert.h"
18
19 #ifdef ENABLE_ASSERTIONS
20 #include "bufferlist.h"
21
22 extern BufferList bufferlist;
23
24 void emergencySave() {
25         static bool didSafe = false;
26         if (didSafe)
27                 return;
28
29         didSafe = true;
30
31         // emergency save
32         if (!bufferlist.empty())
33                 bufferlist.emergencyWriteAll();
34 }
35
36 #endif