Don't deserialise an array that's NULL

* This should only happen if serialisation corruption is detected, but in that
  case we don't want to crash.
This commit is contained in:
baldurk
2022-08-10 12:21:25 +01:00
parent 2354d656db
commit 8bf0c22d66
+1 -1
View File
@@ -1921,7 +1921,7 @@ struct ScopedDeserialiseArray
}
~ScopedDeserialiseArray()
{
if(m_Ser.IsReading())
if(m_Ser.IsReading() && *m_El)
{
for(uint64_t i = 0; i < count; i++)
Deserialise((*m_El)[i]);