From 4f7cac1d403eec0341823f2d9fc88d2553a74f18 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Tue, 26 Aug 2014 20:42:38 +0200 Subject: [PATCH] Use dynamic cast instead of c-style cast in LLMultiFloater; found by Cinder Roxley --- indra/llui/llmultifloater.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/indra/llui/llmultifloater.cpp b/indra/llui/llmultifloater.cpp index 08c14b78ff..a79db3ad3c 100755 --- a/indra/llui/llmultifloater.cpp +++ b/indra/llui/llmultifloater.cpp @@ -344,7 +344,14 @@ void LLMultiFloater::removeFloater(LLFloater* floaterp) updateResizeLimits(); - tabOpen((LLFloater*)mTabContainer->getCurrentPanel(), false); + // Use dynamic cast instead of c-style cast; found by Cinder Roxley + //tabOpen((LLFloater*)mTabContainer->getCurrentPanel(), false); + LLFloater* tab_floaterp = dynamic_cast(mTabContainer->getCurrentPanel()); + if (tab_floaterp) + { + tabOpen(tab_floaterp, false); + } + // } void LLMultiFloater::tabOpen(LLFloater* opened_floater, bool from_click)