Index: build_run.c =================================================================== --- build_run.c (revision 2546) +++ build_run.c (revision 2547) @@ -37,6 +37,8 @@ #include #include +#include "emergency.h" + extern void sch_rnd_main_uninit(void); void csch_quit_app(void) @@ -44,13 +46,7 @@ /* save data if necessary. It not needed, then don't trigger EmergencySave * via our atexit() registering of csch_emergency_save(). We presumably wanted to * exit here and thus it is not an emergency. */ -TODO("implemnent this, but for multiple sheets:"); -#if 0 - if (sheet->changed && conf_core.editor.save_in_tmp) - csch_emergency_save(); - else - csch_disable_emergency_save(); -#endif + sch_rnd_emergency_save(); if (rnd_gui->do_exit == NULL) { sch_rnd_main_uninit();