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