diff --git a/core/src/com/unciv/ui/components/Fonts.kt b/core/src/com/unciv/ui/components/Fonts.kt index 627782a88d..c6d44cc516 100644 --- a/core/src/com/unciv/ui/components/Fonts.kt +++ b/core/src/com/unciv/ui/components/Fonts.kt @@ -295,6 +295,9 @@ object Fonts { Gdx.gl.glReadPixels(0, 0, w, h, GL20.GL_RGBA, GL20.GL_UNSIGNED_BYTE, pixmap.pixels) frameBuffer.end() + spriteBatch.dispose() + frameBuffer.dispose() + // Pixmap is now *upside down* so we need to flip it around the y axis for (i in 0..w) for (j in 0..h/2) {