Commit 6b563b33 authored by Tomaz  Canabrava's avatar Tomaz Canabrava Committed by Kurt Hindenburg
Browse files

Try to fix profile crash

Aparently on some users we are receiving an invalid profile
Do not try to access it's members if the pointer is invalid
parent 893cafe7
Pipeline #244260 failed with stage
in 4 minutes and 27 seconds
......@@ -227,9 +227,15 @@ void SSHManagerModel::triggerProfileChange(const QString &sshHost)
}
auto profiles = Konsole::ProfileManager::instance()->allProfiles();
auto findIt = std::find_if(std::begin(profiles), std::end(profiles), [&profileToLoad](const Konsole::Profile::Ptr &pr) {
return pr->name() == profileToLoad;
if (pr) {
return pr->name() == profileToLoad;
;
}
return false;
});
if (findIt == std::end(profiles)) {
return;
}
......
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