mirror of https://github.com/RPCS3/rpcs3.git
parent
26e13b4f5f
commit
da3f3fd1fb
|
@ -26,7 +26,9 @@ public:
|
||||||
// Get object location
|
// Get object location
|
||||||
std::weak_ptr<T>& wptr = g_ipc.m_map[ipc_key];
|
std::weak_ptr<T>& wptr = g_ipc.m_map[ipc_key];
|
||||||
|
|
||||||
if ((out && !(*out = wptr.lock())) || wptr.expired())
|
std::shared_ptr<T> old;
|
||||||
|
|
||||||
|
if ((out && !(old = wptr.lock())) || wptr.expired())
|
||||||
{
|
{
|
||||||
// Call a function which must return the object
|
// Call a function which must return the object
|
||||||
if (out)
|
if (out)
|
||||||
|
@ -42,6 +44,11 @@ public:
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (out)
|
||||||
|
{
|
||||||
|
*out = std::move(old);
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue