Skip to content

Commit 6f402cd

Browse files
authored
Fix #5256: 修复使用 GIF 背景时调整背景不透明度导致启动器崩溃的问题 (#5262)
1 parent e778d22 commit 6f402cd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

HMCL/src/main/java/org/jackhuang/hmcl/ui/decorator/DecoratorController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ private Background getBackground() {
264264
private Background createBackgroundWithOpacity(Image image, int opacity) {
265265
if (opacity <= 0) {
266266
return new Background(new BackgroundFill(new Color(1, 1, 1, 0), CornerRadii.EMPTY, Insets.EMPTY));
267-
} else if (opacity >= 100) {
267+
} else if (opacity >= 100 || image.getPixelReader() == null) {
268268
return new Background(new BackgroundImage(
269269
image,
270270
BackgroundRepeat.NO_REPEAT,

0 commit comments

Comments
 (0)