mirror of https://github.com/mgba-emu/mgba.git
Util: Fix crash if PNG header fails to write
This commit is contained in:
parent
98e13900ac
commit
a8f003d81a
1
CHANGES
1
CHANGES
|
@ -13,6 +13,7 @@ Other fixes:
|
|||
- GBA Savedata: Fix extracting save when not yet configured in-game
|
||||
- Qt: Fix file handle leak on opening an invalid ROM
|
||||
- Qt: Fix Italian RTC translation (fixes mgba.io/i/1798)
|
||||
- Util: Fix crash if PNG header fails to write
|
||||
Misc:
|
||||
- Qt: Add per-page scrolling to memory view (fixes mgba.io/i/1795)
|
||||
- Qt: Add setting to display ROM filename in title (closes mgba.io/i/1784)
|
||||
|
|
|
@ -47,19 +47,16 @@ static png_infop _pngWriteHeader(png_structp png, unsigned width, unsigned heigh
|
|||
return 0;
|
||||
}
|
||||
png_set_IHDR(png, info, width, height, 8, type, PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE);
|
||||
png_write_info(png, info);
|
||||
return info;
|
||||
}
|
||||
|
||||
png_infop PNGWriteHeader(png_structp png, unsigned width, unsigned height) {
|
||||
png_infop info = _pngWriteHeader(png, width, height, PNG_COLOR_TYPE_RGB);
|
||||
png_write_info(png, info);
|
||||
return info;
|
||||
return _pngWriteHeader(png, width, height, PNG_COLOR_TYPE_RGB);
|
||||
}
|
||||
|
||||
png_infop PNGWriteHeaderA(png_structp png, unsigned width, unsigned height) {
|
||||
png_infop info = _pngWriteHeader(png, width, height, PNG_COLOR_TYPE_RGB_ALPHA);
|
||||
png_write_info(png, info);
|
||||
return info;
|
||||
return _pngWriteHeader(png, width, height, PNG_COLOR_TYPE_RGB_ALPHA);
|
||||
}
|
||||
|
||||
png_infop PNGWriteHeader8(png_structp png, unsigned width, unsigned height) {
|
||||
|
|
Loading…
Reference in New Issue