From cc011743af1b5ad5c37d3e040267f92c1efade32 Mon Sep 17 00:00:00 2001 From: cake Date: Mon, 22 Dec 2025 03:36:06 +0100 Subject: [PATCH] Added null check on GetCid if it is empty, would return zero --- LightlessSync/Services/DalamudUtilService.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/LightlessSync/Services/DalamudUtilService.cs b/LightlessSync/Services/DalamudUtilService.cs index c8668eb..b7958db 100644 --- a/LightlessSync/Services/DalamudUtilService.cs +++ b/LightlessSync/Services/DalamudUtilService.cs @@ -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; }