fix: check if network manager is nil

This commit is contained in:
Siyuan 2025-10-10 15:24:17 +00:00
parent 110790a664
commit 459dc5c9fa
1 changed files with 1 additions and 1 deletions

View File

@ -72,7 +72,7 @@ func updateDisplay() {
}
nativeInstance.UpdateLabelIfChanged("cloud_status_label", fmt.Sprintf("%d active", actionSessions))
if networkManager.IsUp() {
if networkManager != nil && networkManager.IsUp() {
nativeInstance.UISetVar("main_screen", "home_screen")
nativeInstance.SwitchToScreenIf("home_screen", []string{"no_network_screen", "boot_screen"})
} else {