From: Michal MalĂ˝ Date: Wed, 12 Mar 2014 12:02:14 +0000 (+0100) Subject: Do nothing when user wants to save user data with no runs loaded X-Git-Tag: 0.2d~6 X-Git-Url: https://gitweb.devoid-pointer.net/?a=commitdiff_plain;h=d8cd7faf4f8be3cbd48a181d643a27dfec89ec2c;p=anyanka.git Do nothing when user wants to save user data with no runs loaded --- diff --git a/datamanager.cpp b/datamanager.cpp index 9f4b1bc..0428d7c 100644 --- a/datamanager.cpp +++ b/datamanager.cpp @@ -570,11 +570,12 @@ void DataManager::onLoadSingleRun(const QString& str) void DataManager::onSaveChanges() { - std::shared_ptr sr = m_activeSequence->selectedRun(); + std::shared_ptr sr; if (m_activeSequence == nullptr) return; + sr = m_activeSequence->selectedRun(); sr->saveUserDataToJSON(); }