diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 7f238a9a3b0fd3b159a9cfc36f25d476841e6e70..157eb7d662d52a5facd5756f03c032f59213e83b 100755
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -4084,6 +4084,13 @@ void LLAgent::doTeleportViaLocationLookAt(const LLVector3d& pos_global)
 	teleportRequest(region_handle, pos_local, getTeleportKeepsLookAt());
 }
 
+LLAgent::ETeleportState	LLAgent::getTeleportState() const
+{
+    return (mTeleportRequest && (mTeleportRequest->getStatus() == LLTeleportRequest::kFailed)) ? 
+        TELEPORT_NONE : mTeleportState;
+}
+
+
 void LLAgent::setTeleportState(ETeleportState state)
 {
     if (mTeleportRequest && (state != TELEPORT_NONE) && (mTeleportRequest->getStatus() == LLTeleportRequest::kFailed))
diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h
index d46973ddee73c9902a902ddefbead83d3a0bc783..af8bd50c5d9b3bbb4972e8c03074467ff5f8231c 100755
--- a/indra/newview/llagent.h
+++ b/indra/newview/llagent.h
@@ -676,7 +676,7 @@ class LLAgent : public LLOldEvents::LLObservable
 	// Teleport State
 	//--------------------------------------------------------------------
 public:
-	ETeleportState	getTeleportState() const 						{ return mTeleportState; }
+    ETeleportState	getTeleportState() const;
 	void			setTeleportState(ETeleportState state);
 private:
 	ETeleportState	mTeleportState;