mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2024-12-23 04:27:25 +08:00
Crash Fixes (?) (#3081)
This commit is contained in:
parent
cbbcc65931
commit
cee89f5e8a
@ -169,7 +169,7 @@ namespace big::entity
|
|||||||
{
|
{
|
||||||
for (auto vehicle : pools::get_all_vehicles())
|
for (auto vehicle : pools::get_all_vehicles())
|
||||||
{
|
{
|
||||||
if (!include_self_veh && vehicle == gta_util::get_local_vehicle())
|
if (!vehicle || (!include_self_veh && vehicle == gta_util::get_local_vehicle()))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
target_entities.push_back(g_pointers->m_gta.m_ptr_to_handle(vehicle));
|
target_entities.push_back(g_pointers->m_gta.m_ptr_to_handle(vehicle));
|
||||||
@ -180,7 +180,7 @@ namespace big::entity
|
|||||||
{
|
{
|
||||||
for (auto ped : pools::get_all_peds())
|
for (auto ped : pools::get_all_peds())
|
||||||
{
|
{
|
||||||
if (ped == g_local_player)
|
if (!ped || ped == g_local_player)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
target_entities.push_back(g_pointers->m_gta.m_ptr_to_handle(ped));
|
target_entities.push_back(g_pointers->m_gta.m_ptr_to_handle(ped));
|
||||||
@ -191,6 +191,9 @@ namespace big::entity
|
|||||||
{
|
{
|
||||||
for (auto prop : pools::get_all_props())
|
for (auto prop : pools::get_all_props())
|
||||||
{
|
{
|
||||||
|
if (!prop)
|
||||||
|
continue;
|
||||||
|
|
||||||
target_entities.push_back(g_pointers->m_gta.m_ptr_to_handle(prop));
|
target_entities.push_back(g_pointers->m_gta.m_ptr_to_handle(prop));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,7 @@ namespace big::notify
|
|||||||
|
|
||||||
void crash_blocked(CNetGamePlayer* player, const char* crash)
|
void crash_blocked(CNetGamePlayer* player, const char* crash)
|
||||||
{
|
{
|
||||||
if (player)
|
if (player && g_player_service->get_by_id(player->m_player_id))
|
||||||
{
|
{
|
||||||
if ((g_player_service->get_by_id(player->m_player_id)->is_friend() && g.session.trust_friends)
|
if ((g_player_service->get_by_id(player->m_player_id)->is_friend() && g.session.trust_friends)
|
||||||
|| g_player_service->get_by_id(player->m_player_id)->is_trusted || g.session.trust_session)
|
|| g_player_service->get_by_id(player->m_player_id)->is_trusted || g.session.trust_session)
|
||||||
|
Loading…
Reference in New Issue
Block a user