From a8eddf566ef2547a81f8f11162b95366314e17bc Mon Sep 17 00:00:00 2001 From: Trial97 Date: Wed, 11 Feb 2026 13:35:40 +0200 Subject: [PATCH] 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 (cherry picked from commit fe5aee2619754fcdb4a29777c320acdd25d001a5) --- launcher/minecraft/skins/SkinModel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/launcher/minecraft/skins/SkinModel.cpp b/launcher/minecraft/skins/SkinModel.cpp index ca2545e05..e2c41f17b 100644 --- a/launcher/minecraft/skins/SkinModel.cpp +++ b/launcher/minecraft/skins/SkinModel.cpp @@ -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); }