ink
ink copied to clipboard
Crash bug in story-location approximation warnings
When loading a saved state for an Ink story that has changed significantly (common during development), I'm getting frequent crashes in Callstack.cs
's warning about the story location being approximated, because pointer.container
— referenced in the warning message — is null
.
The warning in Callstack.cs
that is causing the problems:
storyContext.Warning ("When loading state, exact internal story location couldn't be found: '" + currentContainerPathStr + "', so it was approximated to '" + pointer.container.path.ToString() + "' to recover. Has the story changed since this save data was created?");
If I just take out the warning, everything works. The location is approximated correctly elsewhere in the Ink runtime and I can use my saved state.
I'll submit a pull request that lets this warning be more flexible and not crash.