mirror of
https://github.com/P3D-Legacy/P3D-Legacy.git
synced 2025-07-29 16:54:56 +02:00
Prevent crash when no Data\Contacts.dat
This commit is contained in:
parent
d516a1e152
commit
3bd6f1af5b
@ -1420,7 +1420,7 @@
|
|||||||
|
|
||||||
Private Sub InitializePhone()
|
Private Sub InitializePhone()
|
||||||
InitializedPhone = True
|
InitializedPhone = True
|
||||||
|
If System.IO.File.Exists(GameModeManager.GetContentFilePath("Data\contacts.dat")) Then
|
||||||
Dim reg() As String = Core.Player.RegisterData.Split(CChar(","))
|
Dim reg() As String = Core.Player.RegisterData.Split(CChar(","))
|
||||||
|
|
||||||
Dim contactData() As String = System.IO.File.ReadAllLines(GameModeManager.GetContentFilePath("Data\contacts.dat"))
|
Dim contactData() As String = System.IO.File.ReadAllLines(GameModeManager.GetContentFilePath("Data\contacts.dat"))
|
||||||
@ -1440,6 +1440,7 @@
|
|||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
End If
|
||||||
|
|
||||||
PhoneContacts = (From c In PhoneContacts Order By c.ID Ascending).ToList()
|
PhoneContacts = (From c In PhoneContacts Order By c.ID Ascending).ToList()
|
||||||
End Sub
|
End Sub
|
||||||
@ -1507,6 +1508,9 @@
|
|||||||
If Core.CurrentScreen.Identification <> Identifications.OverworldScreen Then
|
If Core.CurrentScreen.Identification <> Identifications.OverworldScreen Then
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
If System.IO.File.Exists(GameModeManager.GetContentFilePath("Data\contacts.dat")) = False Then
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
Dim reg() As String = Core.Player.RegisterData.Split(CChar(","))
|
Dim reg() As String = Core.Player.RegisterData.Split(CChar(","))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user