Make sure postPut is called precisely once and after put in Convert::copyUnion.

This commit is contained in:
dhickin
2015-02-11 22:17:45 +00:00
parent b13bb9819a
commit fbebce0a49

View File

@@ -472,10 +472,14 @@ void Convert::copyUnion(PVUnionPtr const & from, PVUnionPtr const & to)
if (toValue.get() == 0 || *toValue->getField() != *fromValue->getField())
{
toValue = pvDataCreate->createPVField(fromValue->getField());
copy(fromValue, toValue);
to->set(toValue);
}
copy(fromValue, toValue);
to->postPut();
else
{
copy(fromValue, toValue);
to->postPut();
}
}
}
else