From 2a28b405125b6d0d0adb662b23850319a26d8d76 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Fri, 11 Jan 2008 00:35:39 +0000 Subject: Added some paranoia checks. svn-id: r30398 --- engines/kyra/sound.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines') 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; -- cgit v1.2.3