From 0d6218bfa0c7e5d64998ce7bad72edb797f2b0a3 Mon Sep 17 00:00:00 2001 From: Fiftytwo Date: Tue, 31 Mar 2020 16:57:45 +0200 Subject: [PATCH] Fix trainer Builder segfault --- src/ui/object_interface.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/ui/object_interface.cpp b/src/ui/object_interface.cpp index d75af46e..97d8f578 100644 --- a/src/ui/object_interface.cpp +++ b/src/ui/object_interface.cpp @@ -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);