Handle case where no tranform matrix exists.

This commit is contained in:
Stuart Buchanan
2017-10-13 17:35:21 +01:00
parent d455f5f445
commit b57dca66be

View File

@@ -433,6 +433,7 @@ namespace canvas
osg::Vec2f Element::posToLocal(const osg::Vec2f& pos) const
{
getMatrix();
if (! _transform) return osg::Vec2f(pos[0], pos[1]);
const osg::Matrix& m = _transform->getInverseMatrix();
return osg::Vec2f
(