summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLynx Linden <lynx@lindenlab.com>2010-01-13 15:15:57 +0000
committerLynx Linden <lynx@lindenlab.com>2010-01-13 15:15:57 +0000
commitdb2321bad296dd82af300e6bfdd50b5d232af067 (patch)
tree99996ff9aa033a9798c07220b2ee7a1c42a5268d
parentdadca1e1b993208ac1092c28083bcfca10a6a72a (diff)
EXT-4220: Fix crash on exit bug.
Don't dereference gVoiceClient without checking for NULL in the cleanup for LLPanelVoiceDeviceSettings. I also fixed the rendering of the color squares in the voice device settings. The frame for these boxes were rendered with an off-by-one error on certain platforms. It seems that gl_box_2d(rect, color, FALSE) suffers from a graphics driver bug under certain platforms. Fixing that would requiring a lot of testing on different hardware configurations, so instead I simlply avoided that specific call.
-rw-r--r--indra/newview/llfloatervoicedevicesettings.cpp20
1 files changed, 16 insertions, 4 deletions
diff --git a/indra/newview/llfloatervoicedevicesettings.cpp b/indra/newview/llfloatervoicedevicesettings.cpp
index d3ef17d402..638c9f1b8c 100644
--- a/indra/newview/llfloatervoicedevicesettings.cpp
+++ b/indra/newview/llfloatervoicedevicesettings.cpp
@@ -122,12 +122,21 @@ void LLPanelVoiceDeviceSettings::draw()
LLView* bar_view = getChild<LLView>(view_name);
if (bar_view)
{
+ gl_rect_2d(bar_view->getRect(), LLColor4::grey, TRUE);
+
+ LLColor4 color;
if (power_bar_idx < discrete_power)
{
- LLColor4 color = (power_bar_idx >= 3) ? LLUIColorTable::instance().getColor("OverdrivenColor") : LLUIColorTable::instance().getColor("SpeakingColor");
- gl_rect_2d(bar_view->getRect(), color, TRUE);
+ color = (power_bar_idx >= 3) ? LLUIColorTable::instance().getColor("OverdrivenColor") : LLUIColorTable::instance().getColor("SpeakingColor");
+ }
+ else
+ {
+ color = LLUIColorTable::instance().getColor("PanelFocusBackgroundColor");
}
- gl_rect_2d(bar_view->getRect(), LLColor4::grey, FALSE);
+
+ LLRect color_rect = bar_view->getRect();
+ color_rect.stretch(-1);
+ gl_rect_2d(color_rect, color, TRUE);
}
}
}
@@ -268,7 +277,10 @@ void LLPanelVoiceDeviceSettings::initialize()
void LLPanelVoiceDeviceSettings::cleanup()
{
- gVoiceClient->tuningStop();
+ if (gVoiceClient)
+ {
+ gVoiceClient->tuningStop();
+ }
LLVoiceChannel::resume();
}