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

List:       kde-commits
Subject:    [katomic/Applications/18.04] /: Fix crash on going to previous atom
From:       Albert Astals Cid <null () kde ! org>
Date:       2018-05-01 0:37:58
Message-ID: E1fDJIs-0004XH-O5 () code ! kde ! org
[Download RAW message or body]

Git commit 7561b4304d1594f592bed6239921d7f347a746ff by Albert Astals Cid.
Committed on 01/05/2018 at 00:37.
Pushed by aacid into branch 'Applications/18.04'.

Fix crash on going to previous atom

BUGS: 366396

M  +1    -1    playfield.cpp

https://commits.kde.org/katomic/7561b4304d1594f592bed6239921d7f347a746ff

diff --git a/playfield.cpp b/playfield.cpp
index 7edc815..a93bdd0 100644
--- a/playfield.cpp
+++ b/playfield.cpp
@@ -260,7 +260,7 @@ void PlayField::previousAtom()
             if( !itemsAtPoint.isEmpty() )
             {
                 AtomFieldItem* item = qgraphicsitem_cast<AtomFieldItem*>( itemsAtPoint[0] );
-                if ( item->atomNum() != -1 )
+                if ( item && item->atomNum() != -1 )
                 {
                     m_selIdx = m_atoms.indexOf(item);
                     updateArrows();
[prev in list] [next in list] [prev in thread] [next in thread] 

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