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

List:       kde-commits
Subject:    KDE/kdegames/kpat
From:       Stephan Kulow <coolo () kde ! org>
Date:       2011-01-26 10:10:58
Message-ID: 20110126101058.2932FAC8BB () svn ! kde ! org
[Download RAW message or body]

SVN commit 1217189 by coolo:

avoid crash on unexpected cards (savegame of bug 185211)


 M  +2 -0      dealer.cpp  


--- trunk/KDE/kdegames/kpat/dealer.cpp #1217188:1217189
@@ -281,6 +281,8 @@
                     int r = card.attribute("value").toInt();
 
                     KCard * c = cards.take( ( s << 4 ) + r );
+		    if (!c)
+		      continue;
                     Q_ASSERT( c );
 
                     c->setFaceUp(card.attribute("faceup").toInt());
[prev in list] [next in list] [prev in thread] [next in thread] 

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