fix: nullcheck _shards before iterating (#1493)
This commit is contained in:
@@ -389,8 +389,11 @@ namespace Discord.WebSocket
|
||||
{
|
||||
if (disposing)
|
||||
{
|
||||
foreach (var client in _shards)
|
||||
client?.Dispose();
|
||||
if (_shards != null)
|
||||
{
|
||||
foreach (var client in _shards)
|
||||
client?.Dispose();
|
||||
}
|
||||
_connectionGroupLock?.Dispose();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user