Skip to content

Commit 8d8ce30

Browse files
author
mwatson
committed
Add null checking for #11
1 parent 1198faa commit 8d8ce30

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Src/StackifyLib/Internal/Logs/LogClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public bool CanSend()
6767

6868
public bool CanQueue()
6969
{
70-
if (!_LogQueue.CanQueue())
70+
if (_LogQueue == null || !_LogQueue.CanQueue())
7171
{
7272
return false;
7373
}

Src/StackifyLib/Logger.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,9 @@ public static AppIdentityInfo Identity()
9595
/// <returns></returns>
9696
public static bool CanSend()
9797
{
98+
if (_LogClient == null)
99+
return false;
100+
98101
return _LogClient.CanQueue();
99102
}
100103

0 commit comments

Comments
 (0)