← Back to team overview

widelands-dev team mailing list archive

[Merge] lp:~widelands-dev/widelands/bug-1833352-empty-game-names into lp:widelands

 

Toni Förster has proposed merging lp:~widelands-dev/widelands/bug-1833352-empty-game-names into lp:widelands.

Commit message:
Fix for corner case: don't set empty game name if no game is present

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #1833352 in widelands: "Disallow empty game names in internet lobby"
  https://bugs.launchpad.net/widelands/+bug/1833352

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1833352-empty-game-names/+merge/369094
-- 
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1833352-empty-game-names into lp:widelands.
=== modified file 'src/ui_fsmenu/internet_lobby.cc'
--- src/ui_fsmenu/internet_lobby.cc	2019-05-29 13:23:54 +0000
+++ src/ui_fsmenu/internet_lobby.cc	2019-06-20 13:45:16 +0000
@@ -445,6 +445,9 @@
 				return;
 			}
 		}
+		if (games->empty() && servername_ui.empty()) {
+			servername_ui = _("unnamed");
+		}
 	}
 
 	g_options.pull_section("global").set_string("servername", servername_ui);


Follow ups