1
0
Fork 0

Fix an (unlikely) startup crash

Encountered this by accidentally clicking during startup
This commit is contained in:
James Turner 2014-02-15 18:48:25 +00:00
parent 130f581b18
commit 33b7e3e32e

View file

@ -65,7 +65,11 @@ public:
virtual bool buttonPressed( int b,
const osgGA::GUIEventAdapter&,
const Info& info )
{
{
if (!panel->getPanel()) {
return false;
}
button = b;
// convert to panel coordinates
osg::Matrixd m = osg::Matrixd::inverse(panel->transformMatrix());