Commit 634b0659a3c19cd9b82a741282c9fb7e0a61e493
1 parent
1219bac9
add null checks for window event handlers
Showing
1 changed file
with
4 additions
and
0 deletions
java/client/com/mumfrey/liteloader/client/CallbackProxyClient.java
| ... | ... | @@ -270,11 +270,13 @@ public class CallbackProxyClient |
| 270 | 270 | |
| 271 | 271 | public static void onResize(EventInfo<Minecraft> e) |
| 272 | 272 | { |
| 273 | + if (CallbackProxyClient.events == null) return; | |
| 273 | 274 | CallbackProxyClient.events.onResize(e.getSource()); |
| 274 | 275 | } |
| 275 | 276 | |
| 276 | 277 | public static void preRenderFBO(EventInfo<Minecraft> e) |
| 277 | 278 | { |
| 279 | + if (CallbackProxyClient.events == null) return; | |
| 278 | 280 | CallbackProxyClient.fboEnabled = OpenGlHelper.isFramebufferEnabled(); |
| 279 | 281 | |
| 280 | 282 | if (CallbackProxyClient.fboEnabled) |
| ... | ... | @@ -286,6 +288,7 @@ public class CallbackProxyClient |
| 286 | 288 | |
| 287 | 289 | public static void postRenderFBO(EventInfo<Minecraft> e) |
| 288 | 290 | { |
| 291 | + if (CallbackProxyClient.events == null) return; | |
| 289 | 292 | CallbackProxyClient.renderingFBO = false; |
| 290 | 293 | |
| 291 | 294 | if (CallbackProxyClient.fboEnabled) |
| ... | ... | @@ -296,6 +299,7 @@ public class CallbackProxyClient |
| 296 | 299 | |
| 297 | 300 | public static void renderFBO(EventInfo<Framebuffer> e, int width, int height) |
| 298 | 301 | { |
| 302 | + if (CallbackProxyClient.events == null) return; | |
| 299 | 303 | if (CallbackProxyClient.renderingFBO) |
| 300 | 304 | { |
| 301 | 305 | CallbackProxyClient.events.onRenderFBO(e.getSource(), width, height); | ... | ... |