mirror of
https://github.com/Ottermandias/Glamourer.git
synced 2026-02-16 20:47:43 +01:00
Fix crashes in rare cases due to non-permanent identifiers.
This commit is contained in:
parent
360c8bb92a
commit
766fe42598
1 changed files with 2 additions and 2 deletions
|
|
@ -122,13 +122,13 @@ public class ActorSelector(ActorObjectManager objects, ActorManager actors, Ephe
|
|||
var buttonWidth = new Vector2(_width / 2, 0);
|
||||
|
||||
if (ImUtf8.IconButton(FontAwesomeIcon.UserCircle, "Select the local player character."u8, buttonWidth, !objects.Player))
|
||||
_identifier = objects.Player.GetIdentifier(actors);
|
||||
_identifier = objects.Player.GetIdentifier(actors).CreatePermanent();
|
||||
|
||||
ImGui.SameLine();
|
||||
var (id, data) = objects.TargetData;
|
||||
var tt = data.Valid ? $"Select the current target {id} in the list." :
|
||||
id.IsValid ? $"The target {id} is not in the list." : "No target selected.";
|
||||
if (ImUtf8.IconButton(FontAwesomeIcon.HandPointer, tt, buttonWidth, objects.IsInGPose || !data.Valid))
|
||||
_identifier = id;
|
||||
_identifier = id.CreatePermanent();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue