Commit 6a9dd9ef authored by Carl Schwan's avatar Carl Schwan 🚴
Browse files

Fix crash when history is still null

Akonadi::IncidenceChanger::history is not guarantee to exists and is
only created later on.

This should fix

Signed-off-by: Carl Schwan's avatarCarl Schwan <>
parent 4590b6eb
Pipeline #249386 passed with stage
in 1 minute and 56 seconds
......@@ -395,6 +395,14 @@ QVariant CalendarManager::getIncidenceSubclassed(KCalendarCore::Incidence::Ptr i
QVariantMap CalendarManager::undoRedoData()
if (!m_changer->history()) {
return {
{QStringLiteral("undoAvailable"), false},
{QStringLiteral("redoAvailable"), false},
{QStringLiteral("nextUndoDescription"), QString()},
{QStringLiteral("nextRedoDescription"), QString()},
return QVariantMap{
{QStringLiteral("undoAvailable"), m_changer->history()->undoAvailable()},
{QStringLiteral("redoAvailable"), m_changer->history()->redoAvailable()},
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment