summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
authorRichard Linden <none@none>2010-09-28 14:21:54 -0700
committerRichard Linden <none@none>2010-09-28 14:21:54 -0700
commitc4cfd1df44c1a6784f7780b03267203400804c48 (patch)
tree0f3e1fc433b434a73f33f93f2e435c856ae17ad0 /indra/llui
parent08017d0af830e925ed73dd39e89d2a24d474b499 (diff)
don't show empty context menus
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/llmenugl.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp
index b1f4b362d5..87f01cf44f 100644
--- a/indra/llui/llmenugl.cpp
+++ b/indra/llui/llmenugl.cpp
@@ -3803,6 +3803,11 @@ void LLContextMenu::setVisible(BOOL visible)
// Takes cursor position in screen space?
void LLContextMenu::show(S32 x, S32 y)
{
+ if (getChildList()->empty())
+ {
+ // nothing to show, so abort
+ return;
+ }
// Save click point for detecting cursor moves before mouse-up.
// Must be in local coords to compare with mouseUp events.
// If the mouse doesn't move, the menu will stay open ala the Mac.