From fb3d272c3c6310fb5aebdec035907134debddbff Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Sun, 31 Jan 2010 21:31:11 +0000 Subject: getFont() should check _cachedFonts and not _cachedViews. Fixes segfaults when using fonts. svn-id: r47779 --- engines/sci/graphics/cache.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines') 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]; -- cgit v1.2.3