fix: check for null pointer
This commit is contained in:
parent
819546382c
commit
9f2619be62
|
@ -93,9 +93,11 @@ namespace XivCommon.Functions {
|
|||
var ret = this.JoinPfHook!.Original(manager, a2, a3, packetData, a5);
|
||||
|
||||
try {
|
||||
var id = (uint) Marshal.ReadInt32(packetData + idOffset);
|
||||
if (this.Listings.TryGetValue(id, out var listing)) {
|
||||
this.JoinParty?.Invoke(listing);
|
||||
if (packetData != IntPtr.Zero) {
|
||||
var id = (uint) Marshal.ReadInt32(packetData + idOffset);
|
||||
if (this.Listings.TryGetValue(id, out var listing)) {
|
||||
this.JoinParty?.Invoke(listing);
|
||||
}
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
PluginLog.LogError(ex, "Exception in PF join detour");
|
||||
|
|
Loading…
Reference in New Issue
Block a user