Commit b85c469e authored by Kurt Hindenburg's avatar Kurt Hindenburg

Check for valid session when detaching to prevent crashes

It is unclear what causes the session to be invalid when detaching
tabs, but there are enough BRs with the same backtraces to confirm it.
For now, check to prevent crashes.

CCBUG: 390736
parent d2baabef
......@@ -374,7 +374,12 @@ void ViewManager::detachView(ViewContainer *container, QWidget *view)
emit viewDetached(_sessionMap[viewToDetach]);
// BR390736 - some instances are sending invalid session to viewDetached()
Session *sessionToDetach = _sessionMap[viewToDetach];
if (sessionToDetach == nullptr) {
emit viewDetached(sessionToDetach);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment