diff options
author | Matthew Hoops | 2010-01-31 21:31:11 +0000 |
---|---|---|
committer | Matthew Hoops | 2010-01-31 21:31:11 +0000 |
commit | fb3d272c3c6310fb5aebdec035907134debddbff (patch) | |
tree | 45ee5b5144cd6e6ad3b305f7628bcaf9fc60e81e /engines/sci/graphics/cache.cpp | |
parent | c66a6db21363c435cf75fb8968ebe76371166ebb (diff) | |
download | scummvm-rg350-fb3d272c3c6310fb5aebdec035907134debddbff.tar.gz scummvm-rg350-fb3d272c3c6310fb5aebdec035907134debddbff.tar.bz2 scummvm-rg350-fb3d272c3c6310fb5aebdec035907134debddbff.zip |
getFont() should check _cachedFonts and not _cachedViews. Fixes segfaults when using fonts.
svn-id: r47779
Diffstat (limited to 'engines/sci/graphics/cache.cpp')
-rw-r--r-- | engines/sci/graphics/cache.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/sci/graphics/cache.cpp b/engines/sci/graphics/cache.cpp index a1330797d4..778a0c2ed2 100644 --- a/engines/sci/graphics/cache.cpp +++ b/engines/sci/graphics/cache.cpp @@ -67,7 +67,7 @@ Font *GfxCache::getFont(GuiResourceId fontId) { if (_cachedFonts.size() >= MAX_CACHED_FONTS) purgeFontCache(); - if (!_cachedViews.contains(fontId)) + if (!_cachedFonts.contains(fontId)) _cachedFonts[fontId] = new Font(_resMan, _screen, fontId); return _cachedFonts[fontId]; |