Commit a0c8abe1 authored by NiranV's avatar NiranV

Fixed: Potential startup crash when gJoystick isn't initialized yet.

parent 558c5d30
......@@ -194,7 +194,7 @@ BOOL LLTool::handleKey(KEY key, MASK mask)
LLTool* LLTool::getOverrideTool(MASK mask)
{
// NOTE: if in flycam mode, ALT-ZOOM camera should be disabled
if (gJoystick->getOverrideCamera())
if (gJoystick && gJoystick->getOverrideCamera())
{
return NULL;
}
......
......@@ -442,9 +442,9 @@ void LLViewerJoystick::init(bool autoenable)
}
LL_INFOS("Joystick") << "ndof: mDriverState=" << mDriverState << "; mNdofDev="
<< mNdofDev << "; libinit=" << libinit << LL_ENDL;
#endif
gJoystick = LLViewerJoystick::getInstance();
#endif
}
void LLViewerJoystick::initDevice(LLSD &guid)
......
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