From dcbd54f103037605c9a1191933e8e0e9d92cba45 Mon Sep 17 00:00:00 2001 From: Joseph Humfrey Date: Wed, 28 Jun 2017 11:05:06 +0100 Subject: [PATCH] Fix for attempting to copy a null callstack --- ink-engine-runtime/StoryState.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ink-engine-runtime/StoryState.cs b/ink-engine-runtime/StoryState.cs index 7a08447c..8e3dc622 100755 --- a/ink-engine-runtime/StoryState.cs +++ b/ink-engine-runtime/StoryState.cs @@ -256,7 +256,8 @@ internal StoryState Copy() } copy.callStack = new CallStack (callStack); - copy._originalCallstack = new CallStack(_originalCallstack); + if( _originalCallstack != null ) + copy._originalCallstack = new CallStack(_originalCallstack); copy.variablesState = new VariablesState (copy.callStack, story.listDefinitions); copy.variablesState.CopyFrom (variablesState);