Fix trainer Builder segfault

modernize-cmake-1
Fiftytwo 2020-03-31 16:57:45 +02:00
parent 853d8eee5d
commit 0d6218bfa0
1 changed files with 5 additions and 4 deletions

View File

@ -1830,10 +1830,11 @@ void CObjectInterface::UpdateInterface()
}
}
if ( type == OBJECT_MOBILEfb ||
type == OBJECT_MOBILEtb ||
type == OBJECT_MOBILEwb ||
type == OBJECT_MOBILEib ) // builder?
if ( (type == OBJECT_MOBILEfb ||
type == OBJECT_MOBILEtb ||
type == OBJECT_MOBILEwb ||
type == OBJECT_MOBILEib) && // builder?
!m_object->GetTrainer() )
{
if(!bEnable) m_buildInterface = false;
CheckInterface(pw, EVENT_OBJECT_BUILD, m_buildInterface);