mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-05-08 03:28:15 +03:00
Add a missing check if mPtr is empty (bug #4715)
This commit is contained in:
parent
71f1a53090
commit
5e071e3eb0
2 changed files with 4 additions and 0 deletions
|
@ -740,6 +740,9 @@ namespace MWGui
|
|||
|
||||
bool DialogueWindow::isCompanion(const MWWorld::Ptr& actor)
|
||||
{
|
||||
if (actor.isEmpty())
|
||||
return false;
|
||||
|
||||
return !actor.getClass().getScript(actor).empty()
|
||||
&& actor.getRefData().getLocals().getIntVar(actor.getClass().getScript(actor), "companion");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue