mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-20 20:39:42 +00:00
Merge pull request #2260 from elsid/fix_clean_unused_navmeshes
Fix clean unused navmeshes
This commit is contained in:
commit
45221418bd
1 changed files with 2 additions and 1 deletions
|
@ -22,7 +22,8 @@ namespace
|
|||
template <class T>
|
||||
bool resetIfUnique(std::shared_ptr<T>& ptr)
|
||||
{
|
||||
const std::weak_ptr<T> weak = std::move(ptr);
|
||||
const std::weak_ptr<T> weak(ptr);
|
||||
ptr.reset();
|
||||
if (auto shared = weak.lock())
|
||||
{
|
||||
ptr = std::move(shared);
|
||||
|
|
Loading…
Reference in a new issue