diff options
Diffstat (limited to 'indra/llui')
-rw-r--r-- | indra/llui/llmenugl.cpp | 20 | ||||
-rw-r--r-- | indra/llui/llnotifications.cpp | 1 |
2 files changed, 13 insertions, 8 deletions
diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index c172a2b714..ceb1e9820e 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -1875,17 +1875,21 @@ void LLMenuGL::scrollItemsDown() item_list_t::iterator next_item_iter; - for (next_item_iter = ++cur_item_iter; next_item_iter != mItems.end(); next_item_iter++) + if (cur_item_iter != mItems.end()) { - if( (*next_item_iter)->getVisible()) + for (next_item_iter = ++cur_item_iter; next_item_iter != mItems.end(); next_item_iter++) { - break; + if( (*next_item_iter)->getVisible()) + { + break; + } + } + + if (next_item_iter != mItems.end() && + (*next_item_iter)->getVisible()) + { + mFirstVisibleItem = *next_item_iter; } - } - - if ((*next_item_iter)->getVisible()) - { - mFirstVisibleItem = *next_item_iter; } mNeedsArrange = TRUE; diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index 86989012ee..a67094b8ce 100644 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -1058,6 +1058,7 @@ LLNotificationChannelPtr LLNotifications::getChannel(const std::string& channelN if(p == mChannels.end()) { llerrs << "Did not find channel named " << channelName << llendl; + return LLNotificationChannelPtr(); } return p->second; } |