From 80047bbb07f11e49c95d9c47428b23760a74132c Mon Sep 17 00:00:00 2001 From: mpv Date: Wed, 11 Nov 2015 15:51:45 +0300 Subject: [PATCH] Fix for the issue #1076 --- src/Model/Model_Document.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Model/Model_Document.cpp b/src/Model/Model_Document.cpp index c6e15c7ef..f767f340e 100755 --- a/src/Model/Model_Document.cpp +++ b/src/Model/Model_Document.cpp @@ -634,6 +634,8 @@ bool Model_Document::canUndo() void Model_Document::undoInternal(const bool theWithSubs, const bool theSynchronize) { + if (myTransactions.empty()) + return; int aNumTransactions = myTransactions.rbegin()->myOCAFNum; myRedos.push_back(*myTransactions.rbegin()); myTransactions.pop_back(); -- 2.39.2