diff --git a/orx-compositor/src/commonMain/kotlin/Compositor.kt b/orx-compositor/src/commonMain/kotlin/Compositor.kt index 95067e16..eb625161 100644 --- a/orx-compositor/src/commonMain/kotlin/Compositor.kt +++ b/orx-compositor/src/commonMain/kotlin/Compositor.kt @@ -177,7 +177,7 @@ open class Layer internal constructor() { } private fun shouldCreateLayerTarget(activeRenderTarget: RenderTarget): Boolean { - return layerTarget == null || (layerTarget?.width != activeRenderTarget.width || layerTarget?.height != activeRenderTarget.height) + return layerTarget == null || ((layerTarget?.width != activeRenderTarget.width || layerTarget?.height != activeRenderTarget.height) && activeRenderTarget.width > 0 && activeRenderTarget.height > 0) } private fun createLayerTarget(activeRenderTarget: RenderTarget, drawer: Drawer) { @@ -269,4 +269,4 @@ class Compositor : Extension { composite.drawLayer(drawer) } } -} \ No newline at end of file +}