Skip to content

Commit 69f6b76

Browse files
committed
Prevent crash when texture format is unrecognized
1 parent bbf81b6 commit 69f6b76

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/net/vulkanmod/render/engine/VkGpuTexture.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ public static TextureFormat textureFormat(int format) {
134134
case VK10.VK_FORMAT_R8G8B8A8_UNORM, VK10.VK_FORMAT_B8G8R8A8_UNORM -> TextureFormat.RGBA8;
135135
case VK10.VK_FORMAT_R8_UNORM -> TextureFormat.RED8;
136136
case VK10.VK_FORMAT_D32_SFLOAT -> TextureFormat.DEPTH32;
137-
default -> throw new IllegalStateException("Unexpected value: " + format);
137+
default -> null;
138138
};
139139
}
140140

0 commit comments

Comments
 (0)