diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2024-04-19 22:40:49 +0300 |
---|---|---|
committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2024-04-19 22:46:49 +0300 |
commit | 5ad488a4a665f715c943004dce42f703204121cd (patch) | |
tree | 7c33c8974169f61fc635720d5e999ec23c288d6e /indra/newview/lltoastnotifypanel.cpp | |
parent | 4016a086075ac1ba3a1bff8bc06468de654dad67 (diff) |
viewer#1290 Fix snapToMessageHeight crash
Diffstat (limited to 'indra/newview/lltoastnotifypanel.cpp')
-rw-r--r-- | indra/newview/lltoastnotifypanel.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/indra/newview/lltoastnotifypanel.cpp b/indra/newview/lltoastnotifypanel.cpp index 9db4bc4d3f..fe8312784d 100644 --- a/indra/newview/lltoastnotifypanel.cpp +++ b/indra/newview/lltoastnotifypanel.cpp @@ -56,8 +56,9 @@ const std::string LLToastNotifyPanel::sFontScript("SansSerif"); LLToastNotifyPanel::button_click_signal_t LLToastNotifyPanel::sButtonClickSignal; LLToastNotifyPanel::LLToastNotifyPanel(const LLNotificationPtr& notification, const LLRect& rect, bool show_images) -: LLCheckBoxToastPanel(notification), - LLInstanceTracker<LLToastNotifyPanel, LLUUID, LLInstanceTrackerReplaceOnCollision>(notification->getID()) +: LLCheckBoxToastPanel(notification) +, LLInstanceTracker<LLToastNotifyPanel, LLUUID, LLInstanceTrackerReplaceOnCollision>(notification->getID()) +, mTextBox(NULL) { init(rect, show_images); } @@ -432,6 +433,15 @@ void LLToastNotifyPanel::init( LLRect rect, bool show_images ) } } +void LLToastNotifyPanel::deleteAllChildren() +{ + // some visibility changes, re-init and reshape will attempt to + // use mTextBox. Null it beforehand to avoid crashes. + mTextBox = NULL; + + LLCheckBoxToastPanel::deleteAllChildren(); +} + bool LLToastNotifyPanel::isControlPanelEnabled() const { bool cp_enabled = mControlPanel->getEnabled(); |