Skip to content

Commit

Permalink
Misc
Browse files Browse the repository at this point in the history
  • Loading branch information
JustArchi committed Feb 28, 2016
1 parent 6a6232b commit 335044e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ArchiSteamFarm/ArchiHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Notification>();
Notifications = new List<Notification>(msg.notifications.Count);
foreach (var notification in msg.notifications) {
Notifications.Add(new Notification {
NotificationType = (Notification.ENotificationType) notification.user_notification_type
Expand All @@ -75,7 +75,7 @@ internal NotificationsCallback(JobID jobID, CMsgClientItemAnnouncements msg) {
return;
}

Notifications = new List<Notification>();
Notifications = new List<Notification>(1);
Notifications.Add(new Notification { NotificationType = Notification.ENotificationType.Items });
}
}
Expand Down

0 comments on commit 335044e

Please sign in to comment.