diff --git a/src/autotype/AutoType.cpp b/src/autotype/AutoType.cpp index cdb68175e..57299fb66 100644 --- a/src/autotype/AutoType.cpp +++ b/src/autotype/AutoType.cpp @@ -335,7 +335,9 @@ void AutoType::executeAutoTypeActions(const Entry* entry, } if (!result.canRetry() || i == max_retries) { - MessageBox::critical(getMainWindow(), tr("Auto-Type Error"), result.errorString()); + if (getMainWindow()) { + MessageBox::critical(getMainWindow(), tr("Auto-Type Error"), result.errorString()); + } emit autotypeRejected(); m_inAutoType.unlock(); return;