mirror of
https://github.com/PrismLauncher/PrismLauncher
synced 2026-04-23 09:05:03 +00:00
fix crash with skin format (#5000)
This commit is contained in:
commit
61d55b4223
|
|
@ -58,7 +58,7 @@ static QImage improveSkin(QImage skin)
|
|||
// It seems some older skins may use this format, which can't be drawn onto
|
||||
// https://github.com/PrismLauncher/PrismLauncher/issues/4032
|
||||
// https://doc.qt.io/qt-6/qpainter.html#begin
|
||||
if (skin.format() == QImage::Format_Indexed8) {
|
||||
if (skin.format() <= QImage::Format_Indexed8 || !skin.hasAlphaChannel()) {
|
||||
skin = skin.convertToFormat(QImage::Format_ARGB32);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue