Fix assertion when resizing screen in result gui

This commit is contained in:
Benau 2020-07-05 09:20:58 +08:00
parent 453b834f85
commit b5f25ef057
2 changed files with 4 additions and 1 deletions

View File

@ -220,7 +220,7 @@ public:
/** Should not be called anymore. */
const core::dimension2du getMiniMapSize() const OVERRIDE
{ assert(false); return core::dimension2du(0, 0); }
{ return core::dimension2du(0, 0); }
/** No kart specific view needs to be rendered in the result gui. */
virtual void renderPlayerView(const Camera *camera, float dt) OVERRIDE {}

View File

@ -1177,6 +1177,9 @@ void Track::updateMiniMapScale()
return;
core::dimension2du mini_map_size = World::getWorld()->getRaceGUI()->getMiniMapSize();
// Happens in race result gui
if (mini_map_size.Width == 0 || mini_map_size.Height == 0)
return;
core::dimension2du mini_map_texture_size = m_render_target->getTextureSize();
if(mini_map_texture_size.Width)