mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-29 19:20:09 +00:00
Fix crash when there is an unknown file format inside palettes/ folder
This commit is contained in:
parent
e0fea708f8
commit
59cdae7715
@ -61,7 +61,7 @@ Palette* load_palette(const char *filename)
|
||||
}
|
||||
else {
|
||||
FileFormat* ff = FileFormatsManager::instance()->getFileFormatByExtension(ext.c_str());
|
||||
if (ff->support(FILE_SUPPORT_LOAD)) {
|
||||
if (ff && ff->support(FILE_SUPPORT_LOAD)) {
|
||||
FileOp* fop = fop_to_load_document(NULL, filename,
|
||||
FILE_LOAD_SEQUENCE_NONE |
|
||||
FILE_LOAD_ONE_FRAME);
|
||||
@ -108,7 +108,7 @@ bool save_palette(const char *filename, const Palette* pal)
|
||||
}
|
||||
else {
|
||||
FileFormat* ff = FileFormatsManager::instance()->getFileFormatByExtension(ext.c_str());
|
||||
if (ff->support(FILE_SUPPORT_SAVE)) {
|
||||
if (ff && ff->support(FILE_SUPPORT_SAVE)) {
|
||||
app::Context tmpContext;
|
||||
doc::Document* doc = tmpContext.documents().add(
|
||||
16, 16, doc::ColorMode::INDEXED,
|
||||
|
Loading…
x
Reference in New Issue
Block a user