Do not allow deleting the player object (Fixes #2982)

openmw-38
scrawl 9 years ago
parent 39feb547a0
commit bc1f7499ab

@ -1073,6 +1073,9 @@ namespace MWWorld
{
if (!ptr.getRefData().isDeleted() && ptr.getContainerStore() == NULL)
{
if (ptr == getPlayerPtr())
throw std::runtime_error("can not delete player object");
ptr.getRefData().setCount(0);
if (ptr.isInCell()

Loading…
Cancel
Save