From 335044e38acb1959f98e02cd7d0e1a5aba0ec37c Mon Sep 17 00:00:00 2001 From: JustArchi Date: Sun, 28 Feb 2016 03:43:01 +0100 Subject: [PATCH] Misc --- ArchiSteamFarm/ArchiHandler.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ArchiSteamFarm/ArchiHandler.cs b/ArchiSteamFarm/ArchiHandler.cs index 04851b2db7cfb..af73f08ab5270 100644 --- a/ArchiSteamFarm/ArchiHandler.cs +++ b/ArchiSteamFarm/ArchiHandler.cs @@ -56,11 +56,11 @@ internal enum ENotificationType : uint { internal NotificationsCallback(JobID jobID, CMsgClientUserNotifications msg) { JobID = jobID; - if (msg == null) { + if (msg == null || msg.notifications == null) { return; } - Notifications = new List(); + Notifications = new List(msg.notifications.Count); foreach (var notification in msg.notifications) { Notifications.Add(new Notification { NotificationType = (Notification.ENotificationType) notification.user_notification_type @@ -75,7 +75,7 @@ internal NotificationsCallback(JobID jobID, CMsgClientItemAnnouncements msg) { return; } - Notifications = new List(); + Notifications = new List(1); Notifications.Add(new Notification { NotificationType = Notification.ENotificationType.Items }); } }