NWaveSpectrum: avoid error if context not ready yet

This commit is contained in:
ItsLemmy
2025-11-09 11:09:16 -05:00
parent 2cea2d12de
commit d9ca5cdd3a
+2 -1
View File
@@ -38,7 +38,8 @@ Item {
onRenderingActiveChanged: {
if (!renderingActive) {
var ctx = canvas.getContext("2d")
ctx.reset()
if (ctx)
ctx.reset()
canvas.requestPaint()
}
}