mirror of
https://github.com/P3D-Legacy/P3D-Legacy.git
synced 2025-07-29 00:34:38 +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()
|
||||
InitializedPhone = True
|
||||
|
||||
If System.IO.File.Exists(GameModeManager.GetContentFilePath("Data\contacts.dat")) Then
|
||||
Dim reg() As String = Core.Player.RegisterData.Split(CChar(","))
|
||||
|
||||
Dim contactData() As String = System.IO.File.ReadAllLines(GameModeManager.GetContentFilePath("Data\contacts.dat"))
|
||||
@ -1440,6 +1440,7 @@
|
||||
Next
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
PhoneContacts = (From c In PhoneContacts Order By c.ID Ascending).ToList()
|
||||
End Sub
|
||||
@ -1507,6 +1508,9 @@
|
||||
If Core.CurrentScreen.Identification <> Identifications.OverworldScreen Then
|
||||
Exit Sub
|
||||
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(","))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user