mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-14 06:57:01 +00:00
37 lines
639 B
C++
37 lines
639 B
C++
|
/* This file is part of
|
||
|
* ======================================================
|
||
|
*
|
||
|
* LyX, The Document Processor
|
||
|
*
|
||
|
* Copyright 1995 Matthias Ettrich
|
||
|
* Copyright 1995-2000 The LyX Team.
|
||
|
*
|
||
|
* ====================================================== */
|
||
|
|
||
|
#include <config.h>
|
||
|
|
||
|
#ifdef __GNUG__
|
||
|
#pragma implementation
|
||
|
#endif
|
||
|
|
||
|
#include "LAssert.h"
|
||
|
|
||
|
#ifdef ENABLE_ASSERTIONS
|
||
|
#include "bufferlist.h"
|
||
|
|
||
|
extern BufferList bufferlist;
|
||
|
|
||
|
void emergencySave() {
|
||
|
static bool didSafe = false;
|
||
|
if (didSafe)
|
||
|
return;
|
||
|
|
||
|
didSafe = true;
|
||
|
|
||
|
// emergency save
|
||
|
if (!bufferlist.empty())
|
||
|
bufferlist.emergencyWriteAll();
|
||
|
}
|
||
|
|
||
|
#endif
|