Commit 7109a4de authored by konovalovsergey's avatar konovalovsergey

crash: vml path with formula reference to nonexistent formula.

parent 38e25d49
......@@ -1354,8 +1354,30 @@ namespace NSPresentationEditor
{
switch (eParamType)
{
case ptFormula: { lValue = pManager.m_arResults[lValue]; break; }
case ptAdjust: { lValue = (*(pManager.m_pAdjustments))[lValue]; break; }
case ptFormula:
{
if (0 <= lValue && lValue < pManager.m_arResults.size())
{
lValue = pManager.m_arResults[lValue];
}
else
{
lValue = 0;
}
break;
}
case ptAdjust:
{
if (0 <= lValue && lValue < pManager.m_pAdjustments->size())
{
lValue = (*(pManager.m_pAdjustments))[lValue];
}
else
{
lValue = 0;
}
break;
}
default: break;
};
if (0 != m_arSlices.size())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment