From 3861249a749c99c2a7b05d15ef82f8ff21453d05 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 3 Jan 2012 09:41:16 -0800 Subject: use lazy deletion of views via die() method to avoid some potential crashes --- indra/llui/llmenugl.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'indra/llui/llmenugl.cpp') diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index cb237fca7c..95ecbb1c94 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -947,9 +947,14 @@ LLMenuItemBranchGL::LLMenuItemBranchGL(const LLMenuItemBranchGL::Params& p) LLMenuItemBranchGL::~LLMenuItemBranchGL() { - delete mBranchHandle.get(); + if (mBranchHandle.get()) + { + mBranchHandle.get()->die(); + } } + + // virtual LLView* LLMenuItemBranchGL::getChildView(const std::string& name, BOOL recurse) const { -- cgit v1.2.3