MP Staging: fixed UB when assigning chat connection in local game (bug #25142)

This commit is contained in:
Charles Dang 2016-10-05 10:32:06 +11:00
parent 9b6fc78690
commit 485e24ee26

View file

@ -253,7 +253,10 @@ void tmp_staging::pre_show(twindow& window)
tchatbox& chat = find_widget<tchatbox>(&window, "chat", false);
chat.set_lobby_info(lobby_info_);
chat.set_wesnothd_connection(*wesnothd_connection_);
if(wesnothd_connection_) {
chat.set_wesnothd_connection(*wesnothd_connection_);
}
chat.room_window_open("this game", true); // TODO: better title?
chat.active_window_changed();