From 57653d5cdfe7cee135bbb6cfaa2e5a4e233cd3bd Mon Sep 17 00:00:00 2001 From: Jonathan Moore Liles Date: Mon, 21 Jul 2014 22:31:10 -0700 Subject: [PATCH] Timeline: Don't die when undo function is used when no project is open or when there is nothing left to undo. --- nonlib/Loggable.C | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nonlib/Loggable.C b/nonlib/Loggable.C index bf50335..a815fc8 100644 --- a/nonlib/Loggable.C +++ b/nonlib/Loggable.C @@ -484,6 +484,10 @@ Loggable::do_this ( const char *s, bool reverse ) void Loggable::undo ( void ) { + if ( ! _fp || /* journal not open */ + 1 == _undo_offset ) /* nothing left to undo */ + return; + char *buf; block_start();