Added null check on GetCid if it is empty, would return zero
This commit is contained in:
@@ -490,6 +490,10 @@ public class DalamudUtilService : IHostedService, IMediatorSubscriber
|
||||
{
|
||||
EnsureIsOnFramework();
|
||||
var playerChar = GetPlayerCharacter();
|
||||
|
||||
if (playerChar == null || playerChar.Address == IntPtr.Zero)
|
||||
return 0;
|
||||
|
||||
return ((BattleChara*)playerChar.Address)->Character.ContentId;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user