mirror of https://github.com/Icinga/icinga2.git
parent
3454cf88a7
commit
491acb62ea
|
@ -120,8 +120,15 @@ Array::Ptr ScriptFrame::GetImports(void)
|
||||||
|
|
||||||
void ScriptFrame::AddImport(const Object::Ptr& import)
|
void ScriptFrame::AddImport(const Object::Ptr& import)
|
||||||
{
|
{
|
||||||
Array::Ptr imports = m_Imports->ShallowClone();
|
Array::Ptr imports;
|
||||||
|
|
||||||
|
if (!m_Imports)
|
||||||
|
imports = new Array();
|
||||||
|
else
|
||||||
|
imports = m_Imports->ShallowClone();
|
||||||
|
|
||||||
imports->Add(import);
|
imports->Add(import);
|
||||||
|
|
||||||
m_Imports = imports;
|
m_Imports = imports;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue