diff --git a/src/modules/graphics/Texture.cpp b/src/modules/graphics/Texture.cpp index edae44ff7..8fe4cb814 100644 --- a/src/modules/graphics/Texture.cpp +++ b/src/modules/graphics/Texture.cpp @@ -701,6 +701,10 @@ void Texture::generateMipmaps() if (!supportsGenerateMipmaps(err)) throw love::Exception("%s", err); + auto gfx = Module::getInstance(Module::M_GRAPHICS); + if (gfx != nullptr && gfx->isRenderTargetActive(this)) + throw love::Exception("generateMipmaps cannot be called on this Texture while it's an active render target."); + generateMipmapsInternal(); }