diff --git a/src/client/tile.cpp b/src/client/tile.cpp index 4e34c59c17..862f114dd5 100644 --- a/src/client/tile.cpp +++ b/src/client/tile.cpp @@ -860,8 +860,8 @@ void Tile::setText(const std::string& text, Color color) if (!m_text) { m_text = std::make_shared(); g_dispatcher.scheduleEvent([tile = static_self_cast()] { - if (g_ui.getMapWidget()) - g_ui.getMapWidget()->getMapView()->addForegroundTile(tile); + if (g_client.getMapWidget()) + g_client.getMapWidget()->getMapView()->addForegroundTile(tile); }, g_game.getServerBeat()); } @@ -884,8 +884,8 @@ void Tile::setTimer(int time, Color color) if (!m_timerText) { m_timerText = std::make_shared(); g_dispatcher.scheduleEvent([tile = static_self_cast()] { - if (g_ui.getMapWidget()) - g_ui.getMapWidget()->getMapView()->addForegroundTile(tile); + if (g_client.getMapWidget()) + g_client.getMapWidget()->getMapView()->addForegroundTile(tile); }, g_game.getServerBeat()); }