diff --git a/src/plugins/git/gitplugin.cpp b/src/plugins/git/gitplugin.cpp index de1427e8398..b1b4362956b 100644 --- a/src/plugins/git/gitplugin.cpp +++ b/src/plugins/git/gitplugin.cpp @@ -87,6 +87,7 @@ #include #include #include +#include #include #ifdef WITH_TESTS @@ -477,8 +478,11 @@ void GitPluginPrivate::onApplySettings() bool gitFoundOk; QString errorMessage; m_settings.gitExecutable(&gitFoundOk, &errorMessage); - if (!gitFoundOk) - Core::AsynchronousMessageBox::warning(tr("Git Settings"), errorMessage); + if (!gitFoundOk) { + QTimer::singleShot(0, this, [this, errorMessage] { + Core::AsynchronousMessageBox::warning(tr("Git Settings"), errorMessage); + }); + } } void GitPluginPrivate::cleanCommitMessageFile()