Dark Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 9837f4c

Browse files
Merge pull request #16 from 123tris/bugfix
GetCurrentActor NullReferenceException when no ActorData
2 parents 49a6a04 + 6454f6e commit 9837f4c

File tree

1 file changed

+1
-1
lines changed
  • Runtime
    • RuntimeDialogueGraph.cs

1 file changed

+1
-1
lines changed

Runtime/RuntimeDialogueGraph.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public bool IsConversationDone() {
6363

6464
public ActorData GetCurrentActor() {
6565
var currentNode = DlogObject.NodeDictionary[currentNodeGuid];
66-
if (currentNode.Type != NodeType.NPC) return null;
66+
if (currentNode.Type != NodeType.NPC || string.IsNullOrEmpty(currentNode.ActorGuid)) return null;
6767
var currentNodeActorGuid = currentNode.ActorGuid;
6868
var actor = CurrentData.ActorData[CurrentData.ActorDataIndices[currentNodeActorGuid]];
6969
return actor;

0 commit comments

Comments
(0)