mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-01-04 00:23:27 +08:00
fix: Submarine crash and allowing empty JSON filenames to be saved (#2380)
This commit is contained in:
parent
ab7d8e4924
commit
2819ba3ae9
@ -12,6 +12,7 @@ namespace big
|
|||||||
virtual void execute(const command_arguments&, const std::shared_ptr<command_context> ctx) override
|
virtual void execute(const command_arguments&, const std::shared_ptr<command_context> ctx) override
|
||||||
{
|
{
|
||||||
Vehicle veh = mobile::mechanic::get_personal_vehicle();
|
Vehicle veh = mobile::mechanic::get_personal_vehicle();
|
||||||
|
if (self::veh != veh)
|
||||||
teleport::into_vehicle(veh);
|
teleport::into_vehicle(veh);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -184,6 +184,9 @@ namespace big
|
|||||||
ImGui::SetTooltip("VEHICLE_FOLDER_NAME_EXAMPLE"_T.data());
|
ImGui::SetTooltip("VEHICLE_FOLDER_NAME_EXAMPLE"_T.data());
|
||||||
|
|
||||||
components::button("SAVE_VEHICLE"_T, [] {
|
components::button("SAVE_VEHICLE"_T, [] {
|
||||||
|
if (vehicle_file_name_input[0] == '\0')
|
||||||
|
return;
|
||||||
|
|
||||||
if (!self::veh)
|
if (!self::veh)
|
||||||
return g_notification_service->push_warning("PERSIST_CAR"_T.data(), "PERSIST_CAR_NOT_IN_VEHICLE"_T.data());
|
return g_notification_service->push_warning("PERSIST_CAR"_T.data(), "PERSIST_CAR_NOT_IN_VEHICLE"_T.data());
|
||||||
|
|
||||||
@ -193,6 +196,9 @@ namespace big
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
components::button("SAVE_VEHICLE"_T, [] {
|
components::button("SAVE_VEHICLE"_T, [] {
|
||||||
|
if (vehicle_file_name_input[0] == '\0')
|
||||||
|
return;
|
||||||
|
|
||||||
if (!self::veh)
|
if (!self::veh)
|
||||||
return g_notification_service->push_warning("PERSIST_CAR"_T.data(), "PERSIST_CAR_NOT_IN_VEHICLE"_T.data());
|
return g_notification_service->push_warning("PERSIST_CAR"_T.data(), "PERSIST_CAR_NOT_IN_VEHICLE"_T.data());
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user