mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-28 20:45:33 +00:00
Fix startNewGame assigning an already freed CellStore to the player Ptr supplied to WindowManager. Fixes a crash when equipping lights after starting a new game (bug 967). Side note: The inventory preview's Ptr being assigned a cell at all doesn't make sense, as that is used to determine the light setting which should be the same no matter which cell you're in.
This commit is contained in:
parent
39de0510a0
commit
0e254aa7c7
2 changed files with 3 additions and 2 deletions
|
@ -35,7 +35,7 @@ namespace MWRender
|
|||
, mCamera(NULL)
|
||||
, mNode(NULL)
|
||||
{
|
||||
|
||||
mCharacter.mCell = NULL;
|
||||
}
|
||||
|
||||
void CharacterPreview::onSetup()
|
||||
|
@ -230,7 +230,7 @@ namespace MWRender
|
|||
, mRef(&mBase)
|
||||
{
|
||||
mBase = *mCharacter.get<ESM::NPC>()->mBase;
|
||||
mCharacter = MWWorld::Ptr(&mRef, mCharacter.getCell());
|
||||
mCharacter = MWWorld::Ptr(&mRef, NULL);
|
||||
}
|
||||
|
||||
void RaceSelectionPreview::update(float angle)
|
||||
|
|
|
@ -267,6 +267,7 @@ namespace MWWorld
|
|||
|
||||
// Rebuild player
|
||||
setupPlayer();
|
||||
mPlayer->setCell(NULL);
|
||||
MWWorld::Ptr player = mPlayer->getPlayer();
|
||||
|
||||
// removes NpcStats, ContainerStore etc
|
||||
|
|
Loading…
Reference in a new issue