Fix for 'Crash double-clicking any knob in debug build (git master) (#948)'

Conflicts:
	src/gui/widgets/knob.cpp
This commit is contained in:
Matthew Krafczyk
2014-09-09 01:11:21 +02:00
parent 619f912d12
commit 84895a4f79
2 changed files with 6 additions and 1 deletions

View File

@@ -77,6 +77,9 @@ public:
return oldJournalling;
}
inline bool isEmpty() {
return m_journallingStateStack.isEmpty();
}
protected:
void changeID( jo_id_t _id );

View File

@@ -592,7 +592,9 @@ void knob::mouseReleaseEvent( QMouseEvent* event )
AutomatableModel *thisModel = model();
if( thisModel )
{
thisModel->restoreJournallingState();
if(!thisModel->isEmpty()) {
thisModel->restoreJournallingState();
}
}
}