Commit 07d4928f authored by Georg Gadinger's avatar Georg Gadinger 🐾 Committed by Christoph Cullmann
Browse files

fix segfault when starting up from the session chooser

When launching an existing session from the session chooser without the
Kate main window yet present the client->factory() returns a nullptr, so
calling ->clients on it crashes.
parent 9eee31ee
......@@ -47,6 +47,10 @@ QAction *toolviewShowAction(KXMLGUIClient *client, const QString &toolviewName)
}
KXMLGUIClient *toolviewmanager = nullptr;
if (!client->factory()) {
qWarning() << Q_FUNC_INFO << "don't have a client factory, toolviewName: " << toolviewName;
return nullptr;
}
const auto clients = client->factory()->clients();
for (auto client : clients) {
if (client->componentName() == QStringLiteral("toolviewmanager")) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment