[Scummvm-cvs-logs] SF.net SVN: scummvm:[44104] scummvm/trunk/gui/massadd.cpp

wjpalenstijn at users.sourceforge.net wjpalenstijn at users.sourceforge.net
Tue Sep 15 16:34:23 CEST 2009


Revision: 44104
          http://scummvm.svn.sourceforge.net/scummvm/?rev=44104&view=rev
Author:   wjpalenstijn
Date:     2009-09-15 14:34:21 +0000 (Tue, 15 Sep 2009)

Log Message:
-----------
Fix crash when 'mass add' doesn't find any games

Modified Paths:
--------------
    scummvm/trunk/gui/massadd.cpp

Modified: scummvm/trunk/gui/massadd.cpp
===================================================================
--- scummvm/trunk/gui/massadd.cpp	2009-09-15 12:15:22 UTC (rev 44103)
+++ scummvm/trunk/gui/massadd.cpp	2009-09-15 14:34:21 UTC (rev 44104)
@@ -149,8 +149,10 @@
 		ConfMan.flushToDisk();
 
 		// And scroll to first detected game
-		sort(_games.begin(), _games.end(), GameDescLess());
-		ConfMan.set("temp_selection", _games.front().gameid());
+		if (!_games.empty()) {
+			sort(_games.begin(), _games.end(), GameDescLess());
+			ConfMan.set("temp_selection", _games.front().gameid());
+		}
 
 		close();
 	} else if (cmd == kCancelCmd) {


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list