diff options
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/core/BackgroundBlur.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/core/BackgroundBlur.java b/src/main/java/io/github/moulberry/notenoughupdates/core/BackgroundBlur.java index fc2be97b..eaa733e4 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/core/BackgroundBlur.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/core/BackgroundBlur.java @@ -120,8 +120,14 @@ public class BackgroundBlur { for (Map.Entry<Float, OutputStuff> entry : blurOutput.entrySet()) { if (remove.contains(entry.getKey())) { entry.getValue().framebuffer.deleteFramebuffer(); - entry.getValue().blurShaderHorz.deleteShader(); - entry.getValue().blurShaderVert.deleteShader(); + Shader blurShaderHorz = entry.getValue().blurShaderHorz; + if (blurShaderHorz != null) { + blurShaderHorz.deleteShader(); + } + Shader blurShaderVert = entry.getValue().blurShaderVert; + if (blurShaderVert != null) { + blurShaderVert.deleteShader(); + } } } |