mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-29 04:20:29 +00:00
Merge pull request #2260 from elsid/fix_clean_unused_navmeshes
Fix clean unused navmeshes
This commit is contained in:
commit
45221418bd
@ -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…
x
Reference in New Issue
Block a user