mirror of https://github.com/jetkvm/kvm.git
fix: switch to no_network_screen if network manager is nil
This commit is contained in:
parent
403c1f8fa1
commit
110790a664
|
|
@ -184,7 +184,7 @@ func createErrorDump(logFile *os.File) {
|
||||||
|
|
||||||
fmt.Printf("error dump created: %s\n", filePath)
|
fmt.Printf("error dump created: %s\n", filePath)
|
||||||
|
|
||||||
ensureSymlink(filePath, filepath.Join(errorDumpDir, "last-crash.log"))
|
_ = ensureSymlink(filePath, filepath.Join(errorDumpDir, "last-crash.log"))
|
||||||
}
|
}
|
||||||
|
|
||||||
func doSupervise() {
|
func doSupervise() {
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,11 @@ const (
|
||||||
)
|
)
|
||||||
|
|
||||||
func switchToMainScreen() {
|
func switchToMainScreen() {
|
||||||
|
if networkManager == nil {
|
||||||
|
nativeInstance.SwitchToScreenIfDifferent("no_network_screen")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if networkManager.IsUp() {
|
if networkManager.IsUp() {
|
||||||
nativeInstance.SwitchToScreenIfDifferent("home_screen")
|
nativeInstance.SwitchToScreenIfDifferent("home_screen")
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue