Fix mail crash when pressing cancel with keyboard

This commit is contained in:
JappaWakka 2025-08-20 10:35:17 +02:00
parent 705ff1582c
commit 1ce82cbc06

View File

@ -433,10 +433,12 @@
End If End If
Dim text As String = "" Dim text As String = ""
If TakenFromParty = False Then If index <> -1 Then
text = Core.Player.Mails(index - 1).MailText.CropStringToWidth(FontManager.MainFont, 600) If TakenFromParty = False Then
Else text = Core.Player.Mails(index - 1).MailText.CropStringToWidth(FontManager.MainFont, 600)
text = TempNewMail.MailText.CropStringToWidth(FontManager.MainFont, 600) Else
text = TempNewMail.MailText.CropStringToWidth(FontManager.MainFont, 600)
End If
End If End If
Dim yPlus As Integer = CInt(FontManager.MainFont.MeasureString(text).Y) Dim yPlus As Integer = CInt(FontManager.MainFont.MeasureString(text).Y)