Fix TileElementWantsFootpathConnection test not releasing context.

This commit is contained in:
Matt 2018-12-29 22:47:57 +01:00 committed by Michał Janiszewski
parent 4654e2fc19
commit 8721bef807
2 changed files with 9 additions and 0 deletions

View File

@ -132,6 +132,9 @@ namespace OpenRCT2
, _uiContext(uiContext)
, _localisationService(std::make_unique<LocalisationService>(env))
{
// Can't have more than one context currently.
Guard::Assert(Instance == nullptr);
Instance = this;
}

View File

@ -36,6 +36,12 @@ protected:
SUCCEED();
}
static void TearDownTestCase()
{
if (_context)
_context.reset();
}
private:
static std::shared_ptr<IContext> _context;
};