1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-21 11:23:51 +00:00

Fix crash when repeatedly performing delete/undo due to empty moved record.

- introduced in commit 23e7e3c165
This commit is contained in:
cc9cii 2015-12-19 17:22:09 +11:00
parent 226f7b6928
commit edf4e6ff95

View file

@ -144,6 +144,7 @@ void CSMWorld::RevertCommand::redo()
if (state==RecordBase::State_ModifiedOnly)
{
mOld = std::move(mModel.getRecord (mId).clone());
mModel.removeRows (index.row(), 1);
}
else
@ -179,6 +180,7 @@ void CSMWorld::DeleteCommand::redo()
if (state==RecordBase::State_ModifiedOnly)
{
mOld = std::move(mModel.getRecord (mId).clone());
mModel.removeRows (index.row(), 1);
}
else