fix: nullcheck _shards before iterating (#1493)

This commit is contained in:
Min
2020-04-22 16:02:22 +10:00
committed by GitHub
parent c637bab91a
commit 1f01a2d1fa

View File

@@ -388,9 +388,12 @@ namespace Discord.WebSocket
if (!_isDisposed)
{
if (disposing)
{
if (_shards != null)
{
foreach (var client in _shards)
client?.Dispose();
}
_connectionGroupLock?.Dispose();
}