diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 0593ad100399b7811d7e98b69576ad4b88b4448d..5630bb1a3f4128f9d7ef34a8641856dca34124de 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -1126,7 +1126,10 @@ bool LLAppViewer::init()
 	gSimLastTime = gRenderStartTime.getElapsedTimeF32();
 	gSimFrames = (F32)gFrameCount;
 
-	LLViewerJoystick::getInstance()->init(false);
+    if (gSavedSettings.getBOOL("JoystickEnabled"))
+    {
+        LLViewerJoystick::getInstance()->init(false);
+    }
 
 	try {
 		initializeSecHandler();
diff --git a/indra/newview/llfloaterjoystick.cpp b/indra/newview/llfloaterjoystick.cpp
index ee3d633dd08f4ad312096262fdb35a12f5f228f7..2b672bc89002d02f4d853f68132cddea3fa09d35 100644
--- a/indra/newview/llfloaterjoystick.cpp
+++ b/indra/newview/llfloaterjoystick.cpp
@@ -61,6 +61,11 @@ static LLTrace::SampleStatHandle<>* sJoystickAxes[6] =
 LLFloaterJoystick::LLFloaterJoystick(const LLSD& data)
 	: LLFloater(data)
 {
+    if (!LLViewerJoystick::getInstance()->isJoystickInitialized())
+    {
+        LLViewerJoystick::getInstance()->init(false);
+    }
+
 	initFromSettings();
 }