mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Check for nil connected peripheral
This commit is contained in:
parent
2fc01479d9
commit
5641896ed2
1 changed files with 2 additions and 2 deletions
|
|
@ -445,12 +445,12 @@ class BLEManager: NSObject, CBPeripheralDelegate, ObservableObject {
|
|||
}
|
||||
}
|
||||
// Channels
|
||||
if decodedInfo.channel.isInitialized {
|
||||
if decodedInfo.channel.isInitialized && connectedPeripheral != nil {
|
||||
nowKnown = true
|
||||
channelPacket(channel: decodedInfo.channel, fromNum: connectedPeripheral.num, context: context!)
|
||||
}
|
||||
// Config
|
||||
if decodedInfo.config.isInitialized && !invalidVersion {
|
||||
if decodedInfo.config.isInitialized && !invalidVersion && connectedPeripheral != nil {
|
||||
|
||||
nowKnown = true
|
||||
localConfig(config: decodedInfo.config, context: context!, nodeNum: self.connectedPeripheral.num, nodeLongName: self.connectedPeripheral.longName)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue