summaryrefslogtreecommitdiff
path: root/indra/llui/lldraghandle.cpp
diff options
context:
space:
mode:
authorsimon <none@none>2014-02-26 12:49:29 -0800
committersimon <none@none>2014-02-26 12:49:29 -0800
commit100b9154dd00187079529dab7b4076bdac92c027 (patch)
tree2c566ee79a5d358b94fb1d99e00dae9941858417 /indra/llui/lldraghandle.cpp
parent6f1df3172ebf377ac0f303022c930a0a1da2ed43 (diff)
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.
Diffstat (limited to 'indra/llui/lldraghandle.cpp')
-rwxr-xr-xindra/llui/lldraghandle.cpp5
1 files changed, 3 insertions, 2 deletions
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<LLFloater *>(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