aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/graphics/cache.cpp
diff options
context:
space:
mode:
authorMax Horn2010-06-28 11:20:33 +0000
committerMax Horn2010-06-28 11:20:33 +0000
commit2c01d10a36f50da6c8bdcfe70558f7d9a2e56324 (patch)
tree5b33d3bbc12602e069fb84f962cfa341c5c69ae7 /engines/sci/graphics/cache.cpp
parent9f48a37671737229e76cd38cf766d855fd2e7318 (diff)
downloadscummvm-rg350-2c01d10a36f50da6c8bdcfe70558f7d9a2e56324.tar.gz
scummvm-rg350-2c01d10a36f50da6c8bdcfe70558f7d9a2e56324.tar.bz2
scummvm-rg350-2c01d10a36f50da6c8bdcfe70558f7d9a2e56324.zip
SCI: Remove GfxView::getLoopInfo; add assert to GfxView::getCelInfo
The return value of GfxView::getCelInfo was used virtually everywhere without a check for it being non-NULL. Hence instead of returning NULL when the loop count is zero, it makes more sense to assert out (instead of a segfault, or worse, random data being used). svn-id: r50422
Diffstat (limited to 'engines/sci/graphics/cache.cpp')
-rw-r--r--engines/sci/graphics/cache.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/sci/graphics/cache.cpp b/engines/sci/graphics/cache.cpp
index 81bdab80ea..8caa28b3a1 100644
--- a/engines/sci/graphics/cache.cpp
+++ b/engines/sci/graphics/cache.cpp
@@ -102,7 +102,7 @@ int16 GfxCache::kernelViewGetLoopCount(GuiResourceId viewId) {
}
int16 GfxCache::kernelViewGetCelCount(GuiResourceId viewId, int16 loopNo) {
- return getView(viewId)->getLoopInfo(loopNo)->celCount;
+ return getView(viewId)->getCelCount(loopNo);
}
} // End of namespace Sci