FakeFishGames / Barotrauma

A 2D online multiplayer game taking place in a submarine travelling through the icy depths of Jupiter's moon Europa.
http://www.barotraumagame.com/
1.75k stars 407 forks source link

[Unstable 0.17.3.0] Selecting a player from the tab crewlist who hasn't yet joined the round crashes the game #8571

Closed Rokvach closed 2 years ago

Rokvach commented 2 years ago

Steps To Reproduce Select someone who is either still joining a server or is spectating in the crewlist

Version Unstable 0.17.3.0

Additional information

Exception: Tried to create a wallet frame for a null character (Parameter 'character') (System.ArgumentNullException)
Target site: Void CreateWalletFrame(Barotrauma.GUIComponent, Barotrauma.Character)
Stack trace: 
   at Barotrauma.TabMenu.CreateWalletFrame(GUIComponent parent, Character character) in <DEV>\Barotrauma\BarotraumaClient\ClientSource\GUI\TabMenu.cs:line 829
   at Barotrauma.TabMenu.SelectElement(Object userData, GUIComponent crewList) in <DEV>\Barotrauma\BarotraumaClient\ClientSource\GUI\TabMenu.cs:line 823
   at Barotrauma.TabMenu.<>c__DisplayClass44_2.<CreateCrewListFrame>b__6(GUIComponent component, Object obj) in <DEV>\Barotrauma\BarotraumaClient\ClientSource\GUI\TabMenu.cs:line 440
   at Barotrauma.GUIListBox.Select(Int32 childIndex, Boolean force, Boolean autoScroll, Boolean takeKeyBoardFocus) in <DEV>\Barotrauma\BarotraumaClient\ClientSource\GUI\GUIListBox.cs:line 1004
   at Barotrauma.GUIListBox.UpdateChildrenRect() in <DEV>\Barotrauma\BarotraumaClient\ClientSource\GUI\GUIListBox.cs:line 724
   at Barotrauma.GUIListBox.Update(Single deltaTime) in <DEV>\Barotrauma\BarotraumaClient\ClientSource\GUI\GUIListBox.cs:line 845
   at Barotrauma.GUI.Update(Single deltaTime) in <DEV>\Barotrauma\BarotraumaClient\ClientSource\GUI\GUI.cs:line 1188
   at Barotrauma.GameMain.Update(GameTime gameTime) in <DEV>\Barotrauma\BarotraumaClient\ClientSource\GameMain.cs:line 883
   at Microsoft.Xna.Framework.Game.DoUpdate(GameTime gameTime) in <DEV>\Libraries\MonoGame.Framework\Src\MonoGame.Framework\Game.cs:line 656
   at Microsoft.Xna.Framework.Game.Tick() in <DEV>\Libraries\MonoGame.Framework\Src\MonoGame.Framework\Game.cs:line 504
   at Microsoft.Xna.Framework.SdlGamePlatform.RunLoop() in <DEV>\Libraries\MonoGame.Framework\Src\MonoGame.Framework\SDL\SDLGamePlatform.cs:line 94
   at Microsoft.Xna.Framework.Game.Run(GameRunBehavior runBehavior) in <DEV>\Libraries\MonoGame.Framework\Src\MonoGame.Framework\Game.cs:line 398
   at Microsoft.Xna.Framework.Game.Run() in <DEV>\Libraries\MonoGame.Framework\Src\MonoGame.Framework\Game.cs:line 368
   at Barotrauma.Program.Main(String[] args) in <DEV>\Barotrauma\BarotraumaClient\ClientSource\Program.cs:line 59
Regalis11 commented 2 years ago

Fixed in https://github.com/Regalis11/Barotrauma-development/commit/0c5293b6f18b9022f10202bc82d8f4b717b9eaba

Rokvach commented 2 years ago

Tested, working correctly. Closing.