summaryrefslogtreecommitdiff
path: root/indra/newview/lltoolfocus.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/lltoolfocus.cpp')
-rw-r--r--indra/newview/lltoolfocus.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/indra/newview/lltoolfocus.cpp b/indra/newview/lltoolfocus.cpp
index cdfc6c2ebf..d5abfbdab6 100644
--- a/indra/newview/lltoolfocus.cpp
+++ b/indra/newview/lltoolfocus.cpp
@@ -262,9 +262,11 @@ BOOL LLToolCamera::handleMouseUp(S32 x, S32 y, MASK mask)
{
LLCoordGL mouse_pos;
LLVector3 focus_pos = gAgent.getPosAgentFromGlobal(gAgent.getFocusGlobal());
- gCamera->projectPosAgentToScreen(focus_pos, mouse_pos);
-
- LLUI::setCursorPositionScreen(mouse_pos.mX, mouse_pos.mY);
+ BOOL success = gCamera->projectPosAgentToScreen(focus_pos, mouse_pos);
+ if (success)
+ {
+ LLUI::setCursorPositionScreen(mouse_pos.mX, mouse_pos.mY);
+ }
}
else if (mMouseSteering)
{