summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/llscrollcontainer.cpp4
-rw-r--r--indra/llui/llscrollcontainer.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/indra/llui/llscrollcontainer.cpp b/indra/llui/llscrollcontainer.cpp
index 402c050d2e..6f1572eda5 100644
--- a/indra/llui/llscrollcontainer.cpp
+++ b/indra/llui/llscrollcontainer.cpp
@@ -202,7 +202,7 @@ BOOL LLScrollContainer::handleKeyHere(KEY key, MASK mask)
// NOTE: this should not recurse indefinitely as handleKeyHere
// should not propagate to parent controls, so mScrolledView should *not*
// call LLScrollContainer::handleKeyHere in turn
- if (mScrolledView->handleKeyHere(key, mask))
+ if (mScrolledView && mScrolledView->handleKeyHere(key, mask))
{
return TRUE;
}
@@ -335,7 +335,7 @@ BOOL LLScrollContainer::handleDragAndDrop(S32 x, S32 y, MASK mask,
void LLScrollContainer::calcVisibleSize( S32 *visible_width, S32 *visible_height, BOOL* show_h_scrollbar, BOOL* show_v_scrollbar ) const
{
- const LLRect& rect = mScrolledView->getRect();
+ const LLRect& rect = getScrolledViewRect();
calcVisibleSize(rect, visible_width, visible_height, show_h_scrollbar, show_v_scrollbar);
}
diff --git a/indra/llui/llscrollcontainer.h b/indra/llui/llscrollcontainer.h
index c2d4d2c861..ec4fb0d41f 100644
--- a/indra/llui/llscrollcontainer.h
+++ b/indra/llui/llscrollcontainer.h
@@ -86,7 +86,7 @@ public:
void scrollToShowRect( const LLRect& rect, const LLCoordGL& desired_offset );
void setReserveScrollCorner( BOOL b ) { mReserveScrollCorner = b; }
- const LLRect& getScrolledViewRect() const { return mScrolledView->getRect(); }
+ const LLRect& getScrolledViewRect() const { return mScrolledView ? mScrolledView->getRect() : LLRect::null; }
void pageUp(S32 overlap = 0);
void pageDown(S32 overlap = 0);
void goToTop();