mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-29 01:54:20 +03:00
fix crash with skin format
fixes #4994 All the formats lower than Format_Indexed8 will have less information and can't be used directly. Also added the check for alphaChannel check just to be sure. Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
7cda5e738f
commit
fe5aee2619
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue