mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-22 07:21:26 +00:00
Protect assignment operator from this == &src case
This commit is contained in:
parent
33da0af1d1
commit
80ee1b55ea
@ -120,6 +120,9 @@ MWWorld::InventoryStore::InventoryStore (const InventoryStore& store)
|
|||||||
|
|
||||||
MWWorld::InventoryStore& MWWorld::InventoryStore::operator= (const InventoryStore& store)
|
MWWorld::InventoryStore& MWWorld::InventoryStore::operator= (const InventoryStore& store)
|
||||||
{
|
{
|
||||||
|
if (this == &store)
|
||||||
|
return *this;
|
||||||
|
|
||||||
mListener = store.mListener;
|
mListener = store.mListener;
|
||||||
mInventoryListener = store.mInventoryListener;
|
mInventoryListener = store.mInventoryListener;
|
||||||
mMagicEffects = store.mMagicEffects;
|
mMagicEffects = store.mMagicEffects;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user