Skip to content

Commit

Permalink
Add some safety for the callback invocation
Browse files Browse the repository at this point in the history
  • Loading branch information
sarbian committed Sep 18, 2014
1 parent f119eee commit beb62de
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions moduleManager.cs
Expand Up @@ -578,14 +578,22 @@ private IEnumerator ProcessPatch(List<String> excludePaths)
// TODO : Remove if we ever get a way to load sooner
PartResourceLibrary.Instance.LoadDefinitions();

ready = true;

foreach (var callback in postPatchCallbacks)
{
callback();
try
{
callback();
}
catch (Exception e)
{
log("Exception while running a post patch callback\n" + e);
}
yield return null;
}
yield return null;

ready = true;

}

private void StatusUpdate()
Expand Down

0 comments on commit beb62de

Please sign in to comment.