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);
|
var ret = this.JoinPfHook!.Original(manager, a2, a3, packetData, a5);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
var id = (uint) Marshal.ReadInt32(packetData + idOffset);
|
if (packetData != IntPtr.Zero) {
|
||||||
if (this.Listings.TryGetValue(id, out var listing)) {
|
var id = (uint) Marshal.ReadInt32(packetData + idOffset);
|
||||||
this.JoinParty?.Invoke(listing);
|
if (this.Listings.TryGetValue(id, out var listing)) {
|
||||||
|
this.JoinParty?.Invoke(listing);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
PluginLog.LogError(ex, "Exception in PF join detour");
|
PluginLog.LogError(ex, "Exception in PF join detour");
|
||||||
|
|
Loading…
Reference in New Issue
Block a user