aboutsummaryrefslogtreecommitdiff
path: root/engines/lastexpress/data
diff options
context:
space:
mode:
authorJulien Templier2010-10-18 23:06:52 +0000
committerJulien Templier2010-10-18 23:06:52 +0000
commit9cbae5252ff249946a6b2ab2c65961dd36b7b098 (patch)
treeeba2be93ac9d0f694c50e87442b50d7e0278035a /engines/lastexpress/data
parent70566beb78cc637b0d94ff587c4735d6edaa73ac (diff)
downloadscummvm-rg350-9cbae5252ff249946a6b2ab2c65961dd36b7b098.tar.gz
scummvm-rg350-9cbae5252ff249946a6b2ab2c65961dd36b7b098.tar.bz2
scummvm-rg350-9cbae5252ff249946a6b2ab2c65961dd36b7b098.zip
LASTEXPRESS: Check for a valid sequence in SequenceFrame::getName
This allows the demo to fail gracefully to the debugger instead of crashing svn-id: r53595
Diffstat (limited to 'engines/lastexpress/data')
-rw-r--r--engines/lastexpress/data/sequence.cpp7
-rw-r--r--engines/lastexpress/data/sequence.h2
2 files changed, 8 insertions, 1 deletions
diff --git a/engines/lastexpress/data/sequence.cpp b/engines/lastexpress/data/sequence.cpp
index be8b14fc27..cf71bd6a61 100644
--- a/engines/lastexpress/data/sequence.cpp
+++ b/engines/lastexpress/data/sequence.cpp
@@ -468,6 +468,13 @@ FrameInfo *SequenceFrame::getInfo() {
return _sequence->getFrameInfo(_frame);
}
+Common::String SequenceFrame::getName() {
+ if (!_sequence)
+ error("SequenceFrame::getName: Invalid sequence!");
+
+ return _sequence->getName();
+}
+
bool SequenceFrame::equal(const SequenceFrame *other) const {
return _sequence->getName() == other->_sequence->getName() && _frame == other->_frame;
}
diff --git a/engines/lastexpress/data/sequence.h b/engines/lastexpress/data/sequence.h
index 7de4b2dfa4..25170993df 100644
--- a/engines/lastexpress/data/sequence.h
+++ b/engines/lastexpress/data/sequence.h
@@ -189,7 +189,7 @@ public:
uint32 getFrame() { return _frame; }
bool nextFrame();
- Common::String getName() { return _sequence->getName(); }
+ Common::String getName();
FrameInfo *getInfo();
bool equal(const SequenceFrame *other) const;