fix ClassCastException crash in SharedDepthFramebuffer if Iris is disabled (#218)

This commit is contained in:
Alexdoru authored and GitHub committed 2025-12-03 13:11:51 +01:00
1 parent 1ba88f027e
commit 3d5f91b837
1 file changed
+2 -1
@@ -107,7 +107,8 @@ public class SharedDepthFramebuffer extends CustomFramebuffer {
public void bindFramebuffer() {
super.bindFramebuffer();
if (linkedBuffer != null) {
final int attachment = Mods.ANGELICA ? ((IRenderTargetExt) linkedBuffer).iris$getDepthTextureId()
final int attachment = Mods.ANGELICA && linkedBuffer instanceof IRenderTargetExt
? ((IRenderTargetExt) linkedBuffer).iris$getDepthTextureId()
: linkedBuffer.depthBuffer;
if (attachment != depthAttachment) {
depthAttachment = attachment;