Skip to content

Commit

Permalink
Merge pull request #25 from rix0rrr/master
Browse files Browse the repository at this point in the history
Fixed two NullReferenceExceptions
  • Loading branch information
andyedinborough committed Feb 1, 2012
2 parents 82ad190 + e79ac89 commit f714a61
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion Pop3Client.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ internal override void OnLogin(string username, string password) {
}

internal override void OnLogout() {
SendCommand("QUIT");
if (_Stream != null)
{
SendCommand("QUIT");
}
}

internal override void CheckResultOK(string result) {
Expand Down
2 changes: 1 addition & 1 deletion TextClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public void Disconnect() {
_Stream.Dispose();
_Stream = null;
}
if (!_ReadThread.Join(2000)) {
if (_ReadThread != null && !_ReadThread.Join(2000)) {
_ReadThread.Abort();
}
}
Expand Down

0 comments on commit f714a61

Please sign in to comment.