diff --git a/include/JournallingObject.h b/include/JournallingObject.h index 3f6e47a82..8a2627716 100644 --- a/include/JournallingObject.h +++ b/include/JournallingObject.h @@ -50,7 +50,10 @@ public: void restoreJournallingState() { - m_journalling = m_journallingStateStack.pop(); + if( !isJournallingStateStackEmpty()) + { + m_journalling = m_journallingStateStack.pop(); + } } void addJournalCheckPoint(); @@ -77,6 +80,10 @@ public: return oldJournalling; } + bool isJournallingStateStackEmpty() const + { + return m_journallingStateStack.isEmpty(); + } protected: void changeID( jo_id_t _id );