Merge pull request #395 from kroonhorstdino/diagnostics_helper_null_check

Diagnostics helper null check
master
Yoshifumi Kawai 2022-09-30 18:49:10 +09:00 committed by GitHub
commit e999268305
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 0 deletions

View File

@ -524,6 +524,14 @@ namespace Cysharp.Threading.Tasks
{ {
sb.AppendFormat("------{0}------", header.type.Name); sb.AppendFormat("------{0}------", header.type.Name);
sb.AppendLine(); sb.AppendLine();
if (header.subSystemList is null)
{
sb.AppendFormat("{0} has no subsystems!", header.ToString());
sb.AppendLine();
continue;
}
foreach (var subSystem in header.subSystemList) foreach (var subSystem in header.subSystemList)
{ {
sb.AppendFormat("{0}", subSystem.type.Name); sb.AppendFormat("{0}", subSystem.type.Name);
@ -545,6 +553,11 @@ namespace Cysharp.Threading.Tasks
foreach (var header in playerLoop.subSystemList) foreach (var header in playerLoop.subSystemList)
{ {
if (header.subSystemList is null)
{
continue;
}
foreach (var subSystem in header.subSystemList) foreach (var subSystem in header.subSystemList)
{ {
if (subSystem.type == typeof(UniTaskLoopRunners.UniTaskLoopRunnerInitialization)) if (subSystem.type == typeof(UniTaskLoopRunners.UniTaskLoopRunnerInitialization))