diff options
author | Jonathan White <support@dmapps.us> | 2022-05-01 22:47:38 +0300 |
---|---|---|
committer | Jonathan White <support@dmapps.us> | 2022-06-05 14:04:34 +0300 |
commit | b5e0572155594cfa08bbfc8dd9b4447085c21e97 (patch) | |
tree | 4eb632d861f17e81dd47bf72d34b9406187813ca /src/autotype/AutoType.cpp | |
parent | 0f3a2531e73022257be8c11ed995423c74e58028 (diff) |
Fix Auto-Type gui guard for tests
Prevent showing gui error dialogs when no gui is present. This can occur during auto-type tests.
Diffstat (limited to 'src/autotype/AutoType.cpp')
-rw-r--r-- | src/autotype/AutoType.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
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; |