diff --git a/source/main/AppContext.cpp b/source/main/AppContext.cpp index caaa4a5fd3..f7163dd5eb 100644 --- a/source/main/AppContext.cpp +++ b/source/main/AppContext.cpp @@ -174,7 +174,10 @@ bool AppContext::povMoved(const OIS::JoyStickEvent& arg, int) { App::GetIn void AppContext::windowResized(Ogre::RenderWindow* rw) { App::GetInputEngine()->windowResized(rw); // Update mouse area - App::GetOverlayWrapper()->windowResized(); + if (App::GetOverlayWrapper()) + { + App::GetOverlayWrapper()->windowResized(); + } if (App::sim_state->getEnum() == RoR::AppState::SIMULATION) { for (ActorPtr& actor: App::GetGameContext()->GetActorManager()->GetActors()) diff --git a/source/main/Application.cpp b/source/main/Application.cpp index 60de6d80c4..ba4f395fba 100644 --- a/source/main/Application.cpp +++ b/source/main/Application.cpp @@ -55,22 +55,22 @@ namespace App { // Object instances static AppContext g_app_context; static CacheSystem g_cache_system; -static CameraManager* g_camera_manager; +static CameraManager* g_camera_manager = nullptr; static Console g_console; static ContentManager g_content_manager; static DiscordRpc g_discord_rpc; static GameContext g_game_context; static GfxScene g_gfx_scene; -static GUIManager* g_gui_manager; -static InputEngine* g_input_engine; +static GUIManager* g_gui_manager = nullptr; +static InputEngine* g_input_engine = nullptr; static LanguageEngine g_language_engine; -static MumbleIntegration* g_mumble; -static OverlayWrapper* g_overlay_wrapper; +static MumbleIntegration* g_mumble = nullptr; +static OverlayWrapper* g_overlay_wrapper = nullptr; static OutGauge g_out_gauge; -static ScriptEngine* g_script_engine; -static SoundScriptManager* g_sound_script_manager; -static Terrain* g_sim_terrain; -static ThreadPool* g_thread_pool; +static ScriptEngine* g_script_engine = nullptr; +static SoundScriptManager* g_sound_script_manager = nullptr; +static Terrain* g_sim_terrain = nullptr; +static ThreadPool* g_thread_pool = nullptr; #if USE_SOCKETW static Network g_network; #endif