AUDIT: r17034 - gnucash/trunk/src/gnome-utils - Bug#521957: Do not start autosave timer when shutting down book.
Andreas Köhler
andi5 at cvs.gnucash.org
Sat Mar 15 12:40:36 EDT 2008
Author: andi5
Date: 2008-03-15 12:40:36 -0400 (Sat, 15 Mar 2008)
New Revision: 17034
Trac: http://svn.gnucash.org/trac/changeset/17034
Modified:
gnucash/trunk/src/gnome-utils/gnc-autosave.c
Log:
Bug#521957: Do not start autosave timer when shutting down book.
BP
Modified: gnucash/trunk/src/gnome-utils/gnc-autosave.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-autosave.c 2008-03-15 14:22:01 UTC (rev 17033)
+++ gnucash/trunk/src/gnome-utils/gnc-autosave.c 2008-03-15 16:40:36 UTC (rev 17034)
@@ -268,13 +268,17 @@
g_debug("gnc_main_window_autosave_dirty(dirty = %s)\n",
(dirty ? "TRUE" : "FALSE"));
if (dirty) {
- /* Book state changed from non-dirty to dirty. Start the autosave
- timer. */
- /* First stop a potentially running old timer. */
- gnc_autosave_remove_timer(book);
- /* Add a new timer (timeout) that runs until the next autosave
- timeout. */
- gnc_autosave_add_timer(book);
+ /* Book state changed from non-dirty to dirty. */
+ if (!qof_book_shutting_down(book)) {
+ /* Start the autosave timer.
+ First stop a potentially running old timer. */
+ gnc_autosave_remove_timer(book);
+ /* Add a new timer (timeout) that runs until the next autosave
+ timeout. */
+ gnc_autosave_add_timer(book);
+ } else {
+ g_debug("Shutting down book, ignoring dirty book");
+ }
} else {
/* Book state changed from dirty to non-dirty (probably due to
saving). Delete the running autosave timer. */
More information about the gnucash-changes
mailing list