Fixed CEditValue crash

It happened after pressing slider buttons
master
krzys-h 2015-07-20 12:12:01 +02:00
parent 1c947f9a80
commit 283676fea1
1 changed files with 3 additions and 2 deletions

View File

@ -23,6 +23,8 @@
#include "common/event.h"
#include "common/misc.h"
#include "object/robotmain.h"
#include "ui/edit.h"
#include "ui/button.h"
#include "ui/interface.h"
@ -43,7 +45,7 @@ CEditValue::CEditValue() : CControl ()
m_minValue = 0.0f; // 0%
m_maxValue = 1.0f; // 100%
m_interface = nullptr;
m_interface = CRobotMain::GetInstancePointer()->GetInterface();
}
// Object's destructor.
@ -378,4 +380,3 @@ void CEditValue::SetInterface(CInterface* interface)
}
}