Unverified Commit 8a4144c7 authored by Elijah Semyonov's avatar Elijah Semyonov Committed by GitHub

Avoid creating a texture with a zero width or height (#1131)

See
[CMP-9080](https://youtrack.jetbrains.com/issue/CMP-9080/Native-Crash-in-Skiko-on-desktop#focus=Comments-27-13023060.0-0)
for details
parent e4cf12a1
......@@ -56,6 +56,10 @@ internal class MetalSwingRedrawer(
}
override fun onRender(g: Graphics2D, width: Int, height: Int, nanoTime: Long) {
if (width < 1 || height < 1) {
return
}
autoreleasepool {
autoCloseScope {
texturePtr = makeMetalTexture(adapter.ptr, texturePtr, width, height)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment