Fix nil pool for renamed/removed ids

Would crash on connect otherwise.
This commit is contained in:
Davide De Rosa 2019-04-10 16:14:59 +02:00
parent 414e876ace
commit 489229b1eb
1 changed files with 5 additions and 0 deletions

View File

@ -270,6 +270,11 @@ public class ConnectionService: Codable {
providerProfile.presetId = providerProfile.infrastructure.defaults.preset
}
// fix renamed pool, fall back to default
if providerProfile.pool == nil {
providerProfile.poolId = providerProfile.infrastructure.defaults.pool
}
profile = providerProfile
case .host: