Skip to content
This repository has been archived by the owner on Oct 28, 2019. It is now read-only.

Commit

Permalink
FIX: NullReferenceException when accessing cookie.
Browse files Browse the repository at this point in the history
When the steamLogin cookie was not in the collection a
NullReferenceException was caught and propagated out which prevented the
badge page from ever loading.
  • Loading branch information
opello committed Dec 23, 2015
1 parent 62ef510 commit 5a1ee07
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/IdleMaster/CookieClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ protected override WebResponse GetWebResponse(WebRequest request, System.IAsyncR

// Check, if cookie should be deleted. This means that sessionID is now invalid and user has to log in again.
// Maybe this shoud be done other way (authenticate exception), but because of shared settings and timers in frmMain...
if (cookies.Count > 0)
foreach (Cookie c in cookies)
{
if (cookies["steamLogin"].Value == "deleted")
if (c.Name == "steamLogin" && c.Value == "deleted")
{
Settings.Default.sessionid = string.Empty;
Settings.Default.steamLogin = string.Empty;
Expand Down

0 comments on commit 5a1ee07

Please sign in to comment.