[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [konversation] src/viewer: Fix crash only closing view
From:       Peter Simonsson <peter.simonsson () gmail ! com>
Date:       2016-09-26 17:04:05
Message-ID: E1boZK1-0003OT-KB () code ! kde ! org
[Download RAW message or body]

Git commit c468e36ec7e51b77cc262e110d63c9e7bbfa3782 by Peter Simonsson.
Committed on 26/09/2016 at 17:03.
Pushed by psn into branch 'master'.

Fix crash only closing view

Make sure the m_popupViewIndex is reset if the view closed is the one
having the m_popupViewIndex.

BUG:369337

M  +3    -0    src/viewer/viewcontainer.cpp

http://commits.kde.org/konversation/c468e36ec7e51b77cc262e110d63c9e7bbfa3782

diff --git a/src/viewer/viewcontainer.cpp b/src/viewer/viewcontainer.cpp
index a2fe93d..8994605 100644
--- a/src/viewer/viewcontainer.cpp
+++ b/src/viewer/viewcontainer.cpp
@@ -2040,6 +2040,9 @@ void ViewContainer::cleanupAfterClose(ChatWindow* view)
         const int tabIndex = m_tabWidget->indexOf(view);
 
         if (tabIndex != -1) {
+            if (tabIndex == m_popupViewIndex)
+                m_popupViewIndex = -1;
+
             m_tabWidget->blockSignals(true);
 
             const QModelIndex& idx = indexForView(view);
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic