diff --git a/src/openrct2/title/TitleSequence.cpp b/src/openrct2/title/TitleSequence.cpp index 887b0dff8c..0c82dae072 100644 --- a/src/openrct2/title/TitleSequence.cpp +++ b/src/openrct2/title/TitleSequence.cpp @@ -166,6 +166,7 @@ extern "C" { Memory::Free(handle->HintPath); delete ((IStream *)handle->Stream); + Memory::Free(handle); } } diff --git a/src/openrct2/title/TitleSequence.h b/src/openrct2/title/TitleSequence.h index 259d2354fd..6c1ed64858 100644 --- a/src/openrct2/title/TitleSequence.h +++ b/src/openrct2/title/TitleSequence.h @@ -88,6 +88,11 @@ extern "C" void FreeTitleSequence(TitleSequence * seq); TitleSequenceParkHandle * TitleSequenceGetParkHandle(TitleSequence * seq, size_t index); + + /** + * Close a title sequence park handle. + * The pointer to the handle is invalid after calling this function. + */ void TitleSequenceCloseParkHandle(TitleSequenceParkHandle * handle); bool TileSequenceSave(TitleSequence * seq); bool TileSequenceAddPark(TitleSequence * seq, const utf8 * path, const utf8 * name);