diff --git a/client/citydlg.cpp b/client/citydlg.cpp index cdf9fc8f9b..2d77dfa5fc 100644 --- a/client/citydlg.cpp +++ b/client/citydlg.cpp @@ -1472,6 +1472,7 @@ void city_dialog::hideEvent(QHideEvent *event) unit_focus_update(); } update_map_canvas_visible(); + pcity = nullptr; } queen()->mapview_wdg->show_all_fcwidgets(); } diff --git a/client/citydlg.h b/client/citydlg.h index f602c7479b..488dd262c8 100644 --- a/client/citydlg.h +++ b/client/citydlg.h @@ -359,7 +359,7 @@ class city_dialog : public QWidget { void setup_ui(struct city *qcity); void refresh(); void cma_check_agent(); - struct city *pcity; + struct city *pcity = nullptr; bool dont_focus{false}; private: