fix: Fixes PooledRefList ToList returning wrong size (#1899)
### Summary - Fixed a bug caused by a bad assumption. If `m_List[index]` is sparse and null values are casted, the server does not crash. - Fixed a bug where `PooledRefList.ToList` extension method returned the wrong list size.
This commit is contained in:
parent
a6a647551f
commit
5d9d1a2118
2 changed files with 6 additions and 3 deletions
|
|
@ -1274,7 +1274,10 @@ namespace Server.Gumps
|
|||
i < 9 && index >= 0 && index < m_List.Count;
|
||||
++i, ++index)
|
||||
{
|
||||
var a = (Account)m_List[index];
|
||||
if (m_List[index] is not Account a)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var offset = 200 + i * 20;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue