Fixed null pointer derefence bug

This commit is contained in:
Robert Osfield 2007-06-15 09:29:23 +00:00
parent 9c3ae6f3c2
commit 10235ad0b4
2 changed files with 2 additions and 2 deletions

View File

@ -212,7 +212,7 @@ bool NodeTrackerManipulator::handle(const GUIEventAdapter& ea,GUIActionAdapter&
if (ea.getButtonMask()==0)
{
double timeSinceLastRecordEvent = ea.getTime() - _ga_t0->getTime();
double timeSinceLastRecordEvent = _ga_t0.valid() ? (ea.getTime() - _ga_t0->getTime()) : DBL_MAX;
if (timeSinceLastRecordEvent>0.02) addMouseEvent(ea);
if (isMouseMoving())

View File

@ -107,7 +107,7 @@ bool TrackballManipulator::handle(const GUIEventAdapter& ea,GUIActionAdapter& us
if (ea.getButtonMask()==0)
{
double timeSinceLastRecordEvent = ea.getTime() - _ga_t0->getTime();
double timeSinceLastRecordEvent = _ga_t0.valid() ? (ea.getTime() - _ga_t0->getTime()) : DBL_MAX;
if (timeSinceLastRecordEvent>0.02) addMouseEvent(ea);
if (isMouseMoving())