Fixed nullref exception if the player clicks yes on the "download sub from the server" prompt after returning to the main menu.
This commit is contained in:
@@ -1532,7 +1532,7 @@ namespace Barotrauma
|
|||||||
requestFileBox.Buttons[0].OnClicked += (GUIButton button, object userdata) =>
|
requestFileBox.Buttons[0].OnClicked += (GUIButton button, object userdata) =>
|
||||||
{
|
{
|
||||||
string[] fileInfo = (string[])userdata;
|
string[] fileInfo = (string[])userdata;
|
||||||
GameMain.Client.RequestFile(FileTransferType.Submarine, fileInfo[0], fileInfo[1]);
|
GameMain.Client?.RequestFile(FileTransferType.Submarine, fileInfo[0], fileInfo[1]);
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
requestFileBox.Buttons[1].OnClicked += requestFileBox.Close;
|
requestFileBox.Buttons[1].OnClicked += requestFileBox.Close;
|
||||||
|
|||||||
Reference in New Issue
Block a user