Changeset - r27711:e596f13ed70d
[Not reviewed]
master
0 1 0
Loïc Guilloux - 11 months ago 2023-07-08 14:54:39
glx22@users.noreply.github.com
Fix: [Bootstrap] don't crash when failing to connect to content server (#11122)
1 file changed with 8 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/bootstrap_gui.cpp
Show inline comments
 
@@ -263,6 +263,14 @@ public:
 

	
 
	void OnConnect(bool success) override
 
	{
 
		if (!success) {
 
			UserError("Failed to connect to content server. Please acquire a graphics set for OpenTTD. See section 1.4 of README.md.");
 
			/* _exit_game is used to break out of the outer video driver's MainLoop. */
 
			_exit_game = true;
 
			this->Close();
 
			return;
 
		}
 

	
 
		/* Once connected, request the metadata. */
 
		_network_content_client.RequestContentList(CONTENT_TYPE_BASE_GRAPHICS);
 
	}
0 comments (0 inline, 0 general)