aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorJohannes Schickel2008-01-11 00:35:39 +0000
committerJohannes Schickel2008-01-11 00:35:39 +0000
commit2a28b405125b6d0d0adb662b23850319a26d8d76 (patch)
tree750cd0ccea6ec15c6929e13b37b7761ed3d73f24 /engines
parentf510fb6b14ace362d96b0ea376b4dd539e68ab09 (diff)
downloadscummvm-rg350-2a28b405125b6d0d0adb662b23850319a26d8d76.tar.gz
scummvm-rg350-2a28b405125b6d0d0adb662b23850319a26d8d76.tar.bz2
scummvm-rg350-2a28b405125b6d0d0adb662b23850319a26d8d76.zip
Added some paranoia checks.
svn-id: r30398
Diffstat (limited to 'engines')
-rw-r--r--engines/kyra/sound.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/kyra/sound.h b/engines/kyra/sound.h
index 3aceb97072..e8049a2e15 100644
--- a/engines/kyra/sound.h
+++ b/engines/kyra/sound.h
@@ -177,8 +177,8 @@ public:
protected:
const char *fileListEntry(int file) const { return (_soundDataList != 0 && file >= 0 && file < _soundDataList->_fileListLen) ? _soundDataList->_fileList[file] : ""; }
- const void *cdaData() const { return _soundDataList->_cdaTracks; }
- const int cdaTrackNum() const { return _soundDataList->_cdaNumTracks; }
+ const void *cdaData() const { return _soundDataList != 0 ? _soundDataList->_cdaTracks : 0; }
+ const int cdaTrackNum() const { return _soundDataList != 0 ? _soundDataList->_cdaNumTracks : 0; }
int _musicEnabled;
bool _sfxEnabled;