From 68f6d1d426e7dedd61d81c025e62349d832a2d39 Mon Sep 17 00:00:00 2001 From: andrei Date: Thu, 5 Sep 2024 20:11:05 +0300 Subject: [PATCH] overmap: don't initialize redundant ui_adaptor by default --- src/overmap_ui.cpp | 4 +--- src/overmap_ui.h | 1 - 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/overmap_ui.cpp b/src/overmap_ui.cpp index b2db203c26390..080f623661fac 100644 --- a/src/overmap_ui.cpp +++ b/src/overmap_ui.cpp @@ -1195,10 +1195,8 @@ tiles_redraw_info redraw_info; static void draw( overmap_draw_data_t &data ) { + cata_assert( static_cast( data.ui ) ); ui_adaptor *ui = data.ui.get(); - if( ui == nullptr ) { - return; - } draw_om_sidebar( *ui, g->w_omlegend, data.ictxt, data ); #if defined( TILES ) if( use_tiles && use_tiles_overmap ) { diff --git a/src/overmap_ui.h b/src/overmap_ui.h index 5c35ccfa688a5..80bc075a97101 100644 --- a/src/overmap_ui.h +++ b/src/overmap_ui.h @@ -124,7 +124,6 @@ struct overmap_draw_data_t { input_context ictxt; overmap_draw_data_t() { - ui = std::make_shared(); ictxt = input_context( "OVERMAP" ); } };