aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Montoir2007-01-30 20:18:06 +0000
committerGregory Montoir2007-01-30 20:18:06 +0000
commit5bdfd2d1021354146d8b4c7cf07c967800237a1a (patch)
tree7329c6bb4a07f6a50d513f10b9bd975ff9f60216
parent8c89b0f9d39a9d091eb428709611cbc0e03112b0 (diff)
downloadscummvm-rg350-5bdfd2d1021354146d8b4c7cf07c967800237a1a.tar.gz
scummvm-rg350-5bdfd2d1021354146d8b4c7cf07c967800237a1a.tar.bz2
scummvm-rg350-5bdfd2d1021354146d8b4c7cf07c967800237a1a.zip
added checks to prevent crash if no datafiles can be found, also fixed a typo
svn-id: r25283
-rw-r--r--engines/touche/plugin.cpp4
-rw-r--r--engines/touche/touche.cpp2
2 files changed, 4 insertions, 2 deletions
diff --git a/engines/touche/plugin.cpp b/engines/touche/plugin.cpp
index 17d8894d7c..ab635c4984 100644
--- a/engines/touche/plugin.cpp
+++ b/engines/touche/plugin.cpp
@@ -36,7 +36,7 @@ static GameList GAME_detectGames(const FSList &fslist);
static const PlainGameDescriptor toucheGames[] = {
{"touche", "Touche: The Adventures of the Fifth Musketeer"},
{"touche-fr", "Touche: Les Aventures du Cinquieme Mousquetaire"},
- {"touche-de", "Touche - Die Abenteuer des funften Musketiers"},
+ {"touche-de", "Touche: Die Abenteuer des funften Musketiers"},
{"touche-it", "Touche: The Adventures of the Fifth Musketeer"},
{0, 0}
};
@@ -116,6 +116,8 @@ namespace Touche {
bool ToucheEngine::detectGame() {
int i = Common::AdvancedDetector::detectBestMatchingGame(detectionParams);
+ if (i < 0)
+ return false;
_language = gameDescriptions[i].language;
return true;
diff --git a/engines/touche/touche.cpp b/engines/touche/touche.cpp
index c317091de5..960a62b840 100644
--- a/engines/touche/touche.cpp
+++ b/engines/touche/touche.cpp
@@ -33,7 +33,7 @@
namespace Touche {
ToucheEngine::ToucheEngine(OSystem *system)
- : Engine(system) {
+ : Engine(system), _midiPlayer(0) {
_saveLoadCurrentPage = 0;
_saveLoadCurrentSlot = 0;