diff --git a/src/modules/graphics/graphics.c b/src/modules/graphics/graphics.c index 5eb586d4..67b2c21a 100644 --- a/src/modules/graphics/graphics.c +++ b/src/modules/graphics/graphics.c @@ -1815,7 +1815,7 @@ static Material* lovrTextureGetMaterial(Texture* texture) { } Texture* lovrGraphicsGetWindowTexture(void) { - if (!state.window->gpu) { + if (state.window && !state.window->gpu) { beginFrame(); state.window->gpu = gpu_surface_acquire();