From a6fbfe7b89c7340854b3703467a2862f3cca9b47 Mon Sep 17 00:00:00 2001 From: Edgar Luque Date: Sun, 19 Feb 2023 15:16:21 +0100 Subject: [PATCH] fix --- PartyPlanner/Models/EventType.cs | 2 +- PartyPlanner/PartyPlanner.csproj | 2 +- PartyPlanner/PluginUI.cs | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/PartyPlanner/Models/EventType.cs b/PartyPlanner/Models/EventType.cs index 87bea36..d0f4c3c 100644 --- a/PartyPlanner/Models/EventType.cs +++ b/PartyPlanner/Models/EventType.cs @@ -30,7 +30,7 @@ public class EventType [JsonProperty("attachments")] public string[] Attachments { get; set; } = Array.Empty(); [JsonProperty("locationData")] - public EventLocationData LocationData { get; set; } + public EventLocationData? LocationData { get; set; } } public class EventLocationData diff --git a/PartyPlanner/PartyPlanner.csproj b/PartyPlanner/PartyPlanner.csproj index d4de190..86c0d64 100644 --- a/PartyPlanner/PartyPlanner.csproj +++ b/PartyPlanner/PartyPlanner.csproj @@ -3,7 +3,7 @@ Zhyra - 1.5.0 + 1.5.1 PartyVerse.app, directly on your client! MIT https://github.com/edg-l/PartyPlanner diff --git a/PartyPlanner/PluginUI.cs b/PartyPlanner/PluginUI.cs index 19e33e1..0d96165 100644 --- a/PartyPlanner/PluginUI.cs +++ b/PartyPlanner/PluginUI.cs @@ -81,6 +81,7 @@ public async void UpdateEvents() lastUpdate = DateTime.Now; foreach (var ev in partyVerseEvents) { + if(ev.LocationData == null || ev.LocationData.DataCenter == null) continue; var key = ev.LocationData.DataCenter.Id; if (!eventsByDc.ContainsKey(key))