summaryrefslogtreecommitdiff
path: root/indra/newview/llsidetray.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llsidetray.h')
-rw-r--r--indra/newview/llsidetray.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/indra/newview/llsidetray.h b/indra/newview/llsidetray.h
index 1f8b6b402f..b691a42db1 100644
--- a/indra/newview/llsidetray.h
+++ b/indra/newview/llsidetray.h
@@ -89,10 +89,13 @@ private:
LLView* mMainPanel;
};
-
-class LLSideTray : public LLPanel
+// added inheritance from LLDestroyClass<LLSideTray> to enable Side Tray perform necessary actions
+// while disconnecting viewer in LLAppViewer::disconnectViewer().
+// LLDestroyClassList::instance().fireCallbacks() calls destroyClass method. See EXT-245.
+class LLSideTray : public LLPanel, private LLDestroyClass<LLSideTray>
{
friend class LLUICtrlFactory;
+ friend class LLDestroyClass<LLSideTray>;
public:
LOG_CLASS(LLSideTray);
@@ -216,6 +219,15 @@ protected:
void setPanelRect ();
+
+private:
+ // Implementation of LLDestroyClass<LLSideTray>
+ static void destroyClass()
+ {
+ // Disable SideTray to avoid crashes. EXT-245
+ if (LLSideTray::instanceCreated())
+ LLSideTray::getInstance()->setEnabled(FALSE);
+ }
private: