forked from teamnwah/openmw-tes3coop
Fix dangling model pointer after reference cleanup (Fixes #1653)
This commit is contained in:
parent
f31a5490f3
commit
6cd739678a
3 changed files with 6 additions and 0 deletions
|
@ -157,6 +157,8 @@ void CompanionWindow::resetReference()
|
||||||
{
|
{
|
||||||
ReferenceInterface::resetReference();
|
ReferenceInterface::resetReference();
|
||||||
mItemView->setModel(NULL);
|
mItemView->setModel(NULL);
|
||||||
|
mModel = NULL;
|
||||||
|
mSortModel = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -262,6 +262,8 @@ namespace MWGui
|
||||||
{
|
{
|
||||||
ReferenceInterface::resetReference();
|
ReferenceInterface::resetReference();
|
||||||
mItemView->setModel(NULL);
|
mItemView->setModel(NULL);
|
||||||
|
mModel = NULL;
|
||||||
|
mSortModel = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ContainerWindow::close()
|
void ContainerWindow::close()
|
||||||
|
|
|
@ -536,5 +536,7 @@ namespace MWGui
|
||||||
{
|
{
|
||||||
ReferenceInterface::resetReference();
|
ReferenceInterface::resetReference();
|
||||||
mItemView->setModel(NULL);
|
mItemView->setModel(NULL);
|
||||||
|
mTradeModel = NULL;
|
||||||
|
mSortModel = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue