summaryrefslogtreecommitdiff
path: root/indra/llui/llflatlistview.cpp
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-04-27 08:35:32 +0100
committerTofu Linden <tofu.linden@lindenlab.com>2010-04-27 08:35:32 +0100
commit72a94da05b66d25cd99963a4ea25e49b96431a72 (patch)
tree02d266742a731f433105b8206eb233026acf2622 /indra/llui/llflatlistview.cpp
parent53fd70142fb7cdefffb7845b78d1b8f58cb46e09 (diff)
parent611dfccfcb58878d24d65e50eca0f2364bb16ee5 (diff)
merge from viewer-trunk
Diffstat (limited to 'indra/llui/llflatlistview.cpp')
-rw-r--r--indra/llui/llflatlistview.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/indra/llui/llflatlistview.cpp b/indra/llui/llflatlistview.cpp
index 990bf5cd22..e0b2244654 100644
--- a/indra/llui/llflatlistview.cpp
+++ b/indra/llui/llflatlistview.cpp
@@ -744,12 +744,18 @@ LLRect LLFlatListView::getLastSelectedItemRect()
void LLFlatListView::selectFirstItem ()
{
+ // No items - no actions!
+ if (mItemPairs.empty()) return;
+
selectItemPair(mItemPairs.front(), true);
ensureSelectedVisible();
}
void LLFlatListView::selectLastItem ()
{
+ // No items - no actions!
+ if (mItemPairs.empty()) return;
+
selectItemPair(mItemPairs.back(), true);
ensureSelectedVisible();
}