Skip to content

Commit

Permalink
Merge pull request #395 from kroonhorstdino/diagnostics_helper_null_c…
Browse files Browse the repository at this point in the history
…heck

Diagnostics helper null check
  • Loading branch information
neuecc committed Sep 30, 2022
2 parents 8300c1b + 3f8e43b commit e999268
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/UniTask/Assets/Plugins/UniTask/Runtime/PlayerLoopHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,14 @@ public static void DumpCurrentPlayerLoop()
{
sb.AppendFormat("------{0}------", header.type.Name);
sb.AppendLine();

if (header.subSystemList is null)
{
sb.AppendFormat("{0} has no subsystems!", header.ToString());
sb.AppendLine();
continue;
}

foreach (var subSystem in header.subSystemList)
{
sb.AppendFormat("{0}", subSystem.type.Name);
Expand All @@ -545,6 +553,11 @@ public static bool IsInjectedUniTaskPlayerLoop()

foreach (var header in playerLoop.subSystemList)
{
if (header.subSystemList is null)
{
continue;
}

foreach (var subSystem in header.subSystemList)
{
if (subSystem.type == typeof(UniTaskLoopRunners.UniTaskLoopRunnerInitialization))
Expand Down

0 comments on commit e999268

Please sign in to comment.