Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/keepassxreboot/keepassxc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan White <support@dmapps.us>2022-05-01 22:47:38 +0300
committerJonathan White <support@dmapps.us>2022-06-05 14:04:34 +0300
commitb5e0572155594cfa08bbfc8dd9b4447085c21e97 (patch)
tree4eb632d861f17e81dd47bf72d34b9406187813ca /src/autotype
parent0f3a2531e73022257be8c11ed995423c74e58028 (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')
-rw-r--r--src/autotype/AutoType.cpp4
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;