add failsafe to GetPet
This commit is contained in:
@@ -121,6 +121,7 @@ public class DalamudUtilService : IHostedService
|
|||||||
{
|
{
|
||||||
var mgr = CharacterManager.Instance();
|
var mgr = CharacterManager.Instance();
|
||||||
playerPointer ??= PlayerPointer;
|
playerPointer ??= PlayerPointer;
|
||||||
|
if(playerPointer == IntPtr.Zero) return IntPtr.Zero;
|
||||||
return (IntPtr)mgr->LookupPetByOwnerObject((BattleChara*)playerPointer);
|
return (IntPtr)mgr->LookupPetByOwnerObject((BattleChara*)playerPointer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user