fixing llaccordian crash with multiple child panels

master
Leyla Farazha 2011-05-17 16:38:51 -07:00
parent dfebb9ebb7
commit 03dca7cb7e
2 changed files with 30 additions and 7 deletions

View File

@ -1022,7 +1022,7 @@ void LLAccordionCtrlTab::updateLayout ( const LLRect& child_rect )
S32 panel_width = child_rect.getWidth();
static LLUICachedControl<S32> scrollbar_size ("UIScrollbarSize", 0);
if(mScrollbar->getVisible() != false)
if(mScrollbar && mScrollbar->getVisible() != false)
{
panel_top+=mScrollbar->getDocPos();
panel_width-=scrollbar_size;

View File

@ -75,12 +75,35 @@
min_height="150"
fit_panel="false"
title="MARKETPLACE INBOX">
<view
follows="all"
left="0"
height="40"
top="0"
/>
<panel
follows="all"
left="0"
height="40"
width="250"
top="0"
>
<text
left ="40"
top="15"
height="14"
width="100"
>Just a panel</text>
</panel>
<panel
follows="all"
left="0"
height="40"
visible="false"
width="250"
top="0"
>
<text
left ="40"
top="15"
height="14"
width="100"
>Just a panel 2</text>
</panel>
</accordion_tab>
<accordion_tab
name="tab_attachments"