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

@ -269,6 +269,11 @@ public class ConnectionService: Codable {
if providerProfile.preset == nil {
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