[Scummvm-cvs-logs] SF.net SVN: scummvm:[44106] scummvm/branches/branch-1-0-0/gui/massadd.cpp
wjpalenstijn at users.sourceforge.net
wjpalenstijn at users.sourceforge.net
Tue Sep 15 16:39:24 CEST 2009
Revision: 44106
http://scummvm.svn.sourceforge.net/scummvm/?rev=44106&view=rev
Author: wjpalenstijn
Date: 2009-09-15 14:39:24 +0000 (Tue, 15 Sep 2009)
Log Message:
-----------
Backport of r44104: Fix crash when 'mass add' doesn't find any games
Modified Paths:
--------------
scummvm/branches/branch-1-0-0/gui/massadd.cpp
Modified: scummvm/branches/branch-1-0-0/gui/massadd.cpp
===================================================================
--- scummvm/branches/branch-1-0-0/gui/massadd.cpp 2009-09-15 14:38:11 UTC (rev 44105)
+++ scummvm/branches/branch-1-0-0/gui/massadd.cpp 2009-09-15 14:39:24 UTC (rev 44106)
@@ -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