Skip to content

Commit

Permalink
prevent null reference saving persistentobjects
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelday008 committed Aug 21, 2020
1 parent 478769e commit 4883c81
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions GameManager/SaveManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,7 @@ public SceneNodeSaveData GetSceneNodeSaveData(SceneNode sceneNode) {
saveData = sceneNodeSaveDataDictionary[sceneNode.DisplayName];
} else {
saveData = new SceneNodeSaveData();
saveData.persistentObjects = new List<PersistentObjectSaveData>();
saveData.MyName = sceneNode.DisplayName;
sceneNodeSaveDataDictionary.Add(sceneNode.DisplayName, saveData);
}
Expand Down

0 comments on commit 4883c81

Please sign in to comment.