Fixed crash after removing last program from a robot
parent
c3d7876a5c
commit
89c93c15cd
|
@ -1777,7 +1777,7 @@ void CObjectInterface::UpdateInterface()
|
|||
type == OBJECT_CONTROLLER) // vehicle?
|
||||
{
|
||||
bRun = false;
|
||||
if ( m_selScript < m_programStorage->GetProgramCount() )
|
||||
if (m_selScript >= 0 && m_selScript < m_programStorage->GetProgramCount())
|
||||
{
|
||||
if (m_programStorage->GetProgram(m_selScript)->runnable)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue