1
0
Fork 0
mirror of https://github.com/bjornbytes/lovr.git synced 2024-07-02 20:43:35 +00:00

Fix lovr.graphics.getWindowPass when there's no window;

This commit is contained in:
bjorn 2023-05-04 18:27:02 -07:00
parent f90cd237ca
commit a75086d0e4

View file

@ -1815,7 +1815,7 @@ static Material* lovrTextureGetMaterial(Texture* texture) {
} }
Texture* lovrGraphicsGetWindowTexture(void) { Texture* lovrGraphicsGetWindowTexture(void) {
if (!state.window->gpu) { if (state.window && !state.window->gpu) {
beginFrame(); beginFrame();
state.window->gpu = gpu_surface_acquire(); state.window->gpu = gpu_surface_acquire();