mirror of https://github.com/Icinga/icinga2.git
parent
c9c7f9bed1
commit
9bbe9a4875
|
@ -597,8 +597,9 @@ bool IndexerExpression::GetReference(ScriptFrame& frame, bool init_dict, Value *
|
||||||
{
|
{
|
||||||
Value vparent;
|
Value vparent;
|
||||||
String vindex;
|
String vindex;
|
||||||
|
DebugHint *psdhint = NULL;
|
||||||
|
|
||||||
if (m_Operand1->GetReference(frame, init_dict, &vparent, &vindex, dhint)) {
|
if (m_Operand1->GetReference(frame, init_dict, &vparent, &vindex, &psdhint)) {
|
||||||
if (init_dict && VMOps::GetField(vparent, vindex, m_Operand1->GetDebugInfo()).IsEmpty())
|
if (init_dict && VMOps::GetField(vparent, vindex, m_Operand1->GetDebugInfo()).IsEmpty())
|
||||||
VMOps::SetField(vparent, vindex, new Dictionary(), m_Operand1->GetDebugInfo());
|
VMOps::SetField(vparent, vindex, new Dictionary(), m_Operand1->GetDebugInfo());
|
||||||
|
|
||||||
|
@ -611,8 +612,10 @@ bool IndexerExpression::GetReference(ScriptFrame& frame, bool init_dict, Value *
|
||||||
ExpressionResult operand2 = m_Operand2->Evaluate(frame);
|
ExpressionResult operand2 = m_Operand2->Evaluate(frame);
|
||||||
*index = operand2.GetValue();
|
*index = operand2.GetValue();
|
||||||
|
|
||||||
if (dhint && *dhint)
|
if (dhint && psdhint)
|
||||||
*dhint = new DebugHint((*dhint)->GetChild(*index));
|
*dhint = new DebugHint(psdhint->GetChild(*index));
|
||||||
|
|
||||||
|
delete psdhint;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue