fix(context menu): fix context menu crash (#832)

This commit is contained in:
Aure7138 2023-01-09 04:25:48 +08:00 committed by GitHub
parent ef27f9cb6b
commit 703d1ef07f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -188,6 +188,7 @@ namespace big
void context_menu_service::get_entity_closest_to_screen_center()
{
m_pointer = nullptr;
if (const auto replay = *g_pointers->m_replay_interface; replay)
{
const auto veh_interface = replay->m_vehicle_interface;

View File

@ -50,7 +50,7 @@ namespace big
static void context_menu();
Entity m_handle;
rage::fwEntity* m_pointer;
rage::fwEntity* m_pointer{};
model_bounding_box_screen_space m_model_bounding_box_screen_space;
s_context_menu vehicle_menu{