[pim/kdepim-runtime] kmailtransport: Don't try to remove if instance is invalid.

Laurent Montel <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit 4e515cada7a636b74f0d246ac182ae3fdaa6c024 by Laurent Montel.
Committed on 16/08/2026 at 06:30.
Pushed by mlaurent into branch 'master'.

Don't try to remove if instance is invalid.

M  +1    -0    kmailtransport/akonadimailtransportplugin.cpp

https://invent.kde.org/pim/kdepim-runtime/-/commit/4e515cada7a636b74f0d246ac182ae3fdaa6c024

diff --git a/kmailtransport/akonadimailtransportplugin.cpp b/kmailtransport/akonadimailtransportplugin.cpp
index 554cf1299..89b045125 100644
--- a/kmailtransport/akonadimailtransportplugin.cpp
+++ b/kmailtransport/akonadimailtransportplugin.cpp
@@ -39,6 +39,7 @@ void AkonadiMailTransportPlugin::cleanUp(MailTransport::Transport *t)
     const AgentInstance instance = AgentManager::self()->instance(t->host());
     if (!instance.isValid()) {
         qCWarning(MAILTRANSPORT_AKONADI_LOG) << "Could not find resource instance for name:" << t->host();
+        return;
     }
     AgentManager::self()->removeInstance(instance);
 }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.