aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute/ad/ad_sentence.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/wintermute/ad/ad_sentence.cpp')
-rw-r--r--engines/wintermute/ad/ad_sentence.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/engines/wintermute/ad/ad_sentence.cpp b/engines/wintermute/ad/ad_sentence.cpp
index ba59f57451..ad3a291e16 100644
--- a/engines/wintermute/ad/ad_sentence.cpp
+++ b/engines/wintermute/ad/ad_sentence.cpp
@@ -251,11 +251,8 @@ bool AdSentence::setupTalkFile(const char *soundFilename) {
AnsiString talkDefFileName = PathUtil::combine(path, name + ".talk");
- Common::SeekableReadStream *file = _gameRef->_fileManager->openFile(talkDefFileName.c_str());
- if (file) {
- _gameRef->_fileManager->closeFile(file);
- } else return STATUS_OK; // no talk def file found
-
+ if (!_gameRef->_fileManager->hasFile(talkDefFileName))
+ return STATUS_OK; // no talk def file found
_talkDef = new AdTalkDef(_gameRef);
if (!_talkDef || DID_FAIL(_talkDef->loadFile(talkDefFileName.c_str()))) {