mirror of
https://github.com/scummvm/scummvm.git
synced 2026-06-20 05:45:29 +00:00
DGDS: Avoid crashing on Dragon EGA
This commit is contained in:
1 parent
80becfc075
commit
04f97efdcd
2 files changed
+7
-4
No files matched your search
@@ -33,8 +33,10 @@ namespace Dgds {
|
||||
|
||||
Font *Font::load(const Common::String &filename, ResourceManager *resourceManager, Decompressor *decompressor) {
|
||||
Common::SeekableReadStream *fontFile = resourceManager->getResource(filename);
|
||||
if (!fontFile)
|
||||
error("Font file %s not found", filename.c_str());
|
||||
if (!fontFile) {
|
||||
warning("Font file %s not found", filename.c_str());
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
DgdsChunkReader chunk(fontFile);
|
||||
|
||||
@@ -208,7 +210,7 @@ void FontManager::tryLoadFont(const char *fname, ResourceManager *resMgr, Decomp
|
||||
if (font)
|
||||
_fonts.setVal(ftype, font);
|
||||
else
|
||||
error("Failed to load font %s", fname);
|
||||
warning("Failed to load font %s", fname);
|
||||
}
|
||||
|
||||
FontManager::FontType FontManager::fontTypeByName(const Common::String &filename) const {
|
||||
|
||||
@@ -37,7 +37,8 @@ static const int FILENAME_LENGTH = 12;
|
||||
|
||||
ResourceManager::ResourceManager() {
|
||||
const char *indexFiles[] = {
|
||||
"volume.vga", // early Dragon versions
|
||||
"volume.vga", // Dragon VGA versions
|
||||
"volume.ega", // Dragon EGA versions
|
||||
"volume.rmf", // Beamish / HoC
|
||||
"volume.map" // Beamish CD
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user