diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2024-11-01 01:29:06 +0200 |
---|---|---|
committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2024-11-01 17:54:05 +0200 |
commit | 0114be2c155ed5a3de17f6b49d06fab607b9d6bf (patch) | |
tree | bdd1ee334c90b017403215bf874ed443dd75fc6f /indra/newview/llfloaterimsessiontab.h | |
parent | cbd713037e5636b9f3c360332e23e0e29d2972ce (diff) |
viewer#2985 Odd crash when notifying voice observers
Crash points at enableDisableCallBtn, but button's floater was cleaned
earlier and has a removeObserver call so an observer record should be
long gone. Likely something else is going on.
Went over various callbacks and made sure they are cleaned. But in case
floater somehow remained, added mSession = nullptr.
Diffstat (limited to 'indra/newview/llfloaterimsessiontab.h')
-rw-r--r-- | indra/newview/llfloaterimsessiontab.h | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/indra/newview/llfloaterimsessiontab.h b/indra/newview/llfloaterimsessiontab.h index bee5c8c2c4..367d988f26 100644 --- a/indra/newview/llfloaterimsessiontab.h +++ b/indra/newview/llfloaterimsessiontab.h @@ -45,6 +45,7 @@ class LLPanelEmojiComplete; class LLFloaterIMSessionTab : public LLTransientDockableFloater + , public LLIMSessionObserver { using super = LLTransientDockableFloater; @@ -76,13 +77,13 @@ public: bool isNearbyChat() {return mIsNearbyChat;} // LLFloater overrides - /*virtual*/ void onOpen(const LLSD& key); - /*virtual*/ bool postBuild(); - /*virtual*/ void draw(); - /*virtual*/ void setVisible(bool visible); - /*virtual*/ void setFocus(bool focus); - /*virtual*/ void closeFloater(bool app_quitting = false); - /*virtual*/ void deleteAllChildren(); + void onOpen(const LLSD& key) override; + bool postBuild() override; + void draw() override; + void setVisible(bool visible) override; + void setFocus(bool focus) override; + void closeFloater(bool app_quitting = false) override; + void deleteAllChildren() override; // Handle the left hand participant list widgets void addConversationViewParticipant(LLConversationItem* item, bool update_view = true); @@ -98,7 +99,7 @@ public: virtual void updateMessages() {} LLConversationItem* getCurSelectedViewModelItem(); void forceReshape(); - virtual bool handleKeyHere( KEY key, MASK mask ); + virtual bool handleKeyHere( KEY key, MASK mask ) override; bool isMessagePaneExpanded(){return mMessagePaneExpanded;} void setMessagePaneExpanded(bool expanded){mMessagePaneExpanded = expanded;} void restoreFloater(); @@ -108,6 +109,13 @@ public: LLView* getChatHistory(); + // LLIMSessionObserver triggers + virtual void sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id, bool has_offline_msg) override {}; // Stub + virtual void sessionActivated(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id) override {}; // Stub + virtual void sessionRemoved(const LLUUID& session_id) override; + virtual void sessionVoiceOrIMStarted(const LLUUID& session_id) override {}; // Stub + virtual void sessionIDUpdated(const LLUUID& old_session_id, const LLUUID& new_session_id) override {}; // Stub + protected: // callback for click on any items of the visual states menu @@ -139,8 +147,8 @@ protected: virtual void enableDisableCallBtn(); // process focus events to set a currently active session - /* virtual */ void onFocusReceived(); - /* virtual */ void onFocusLost(); + void onFocusReceived() override; + void onFocusLost() override; // prepare chat's params and out one message to chatHistory void appendMessage(const LLChat& chat, const LLSD& args = LLSD()); @@ -212,7 +220,7 @@ private: void getSelectedUUIDs(uuid_vec_t& selected_uuids); /// Refreshes the floater at a constant rate. - virtual void refresh() = 0; + virtual void refresh() override = 0; /** * Adjusts chat history height to fit vertically with input chat field |