Skip to content

Commit

Permalink
BUG: Check that the queue is not null before sending NewDevice queue.…
Browse files Browse the repository at this point in the history
… For users who have disabled usage sharing.
  • Loading branch information
JoshGrew51D committed Dec 21, 2018
1 parent 3e88ffd commit 2108be5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions FoundationV3/Mobile/Detection/NewDevice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -204,10 +204,12 @@ private static void Run(object state)
var queue = (Queue<byte[]>)state;
try
{
// Check that the queue isn't empty. This can happen if a signle Module didn't
// Check that the queue isn't empty. This can happen if a single Module didn't
// record any information before it was disposed of. This check prevents empty
// requests being sent.
if (queue.Count > 0)
// requests being sent. Check to make sure the queue is not null for those who
// have disabled Usage Sharing.
if (queue != null &&
queue.Count > 0)
{
#if DEBUG
EventLog.Debug("Sending NewDevice Queue");
Expand Down

0 comments on commit 2108be5

Please sign in to comment.