From 100b9154dd00187079529dab7b4076bdac92c027 Mon Sep 17 00:00:00 2001 From: simon Date: Wed, 26 Feb 2014 12:49:29 -0800 Subject: MAINT-3555 : crash in LLPanel::~LLPanel() on shutdown. Fixes to be paranoid about the return type for calls to LLView::getParent(): never assume a down cast is possible. --- indra/llui/lldraghandle.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'indra/llui/lldraghandle.cpp') diff --git a/indra/llui/lldraghandle.cpp b/indra/llui/lldraghandle.cpp index 5f69c6af31..304d21d0df 100755 --- a/indra/llui/lldraghandle.cpp +++ b/indra/llui/lldraghandle.cpp @@ -315,14 +315,15 @@ BOOL LLDragHandle::handleHover(S32 x, S32 y, MASK mask) S32 delta_y = screen_y - mDragLastScreenY; // if dragging a docked floater we want to undock - if (((LLFloater*)getParent())->isDocked()) + LLFloater * parent = dynamic_cast(getParent()); + if (parent && parent->isDocked()) { const S32 SLOP = 12; if (delta_y <= -SLOP || delta_y >= SLOP) { - ((LLFloater*)getParent())->setDocked(false, false); + parent->setDocked(false, false); return TRUE; } else -- cgit v1.2.3