Skip to content

Commit

Permalink
Fixed #3202 - uninitialized pointer access
Browse files Browse the repository at this point in the history
  • Loading branch information
ohlidalp authored and CuriousMike56 committed Jan 10, 2025
1 parent c4d229a commit 0f4234c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
5 changes: 4 additions & 1 deletion source/main/AppContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<AppState>() == RoR::AppState::SIMULATION)
{
for (ActorPtr& actor: App::GetGameContext()->GetActorManager()->GetActors())
Expand Down
18 changes: 9 additions & 9 deletions source/main/Application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0f4234c

Please sign in to comment.