diff --git a/spine-ts/spine-construct3/src/c3runtime/instance.ts b/spine-ts/spine-construct3/src/c3runtime/instance.ts index 901f14d81..aec084c9f 100644 --- a/spine-ts/spine-construct3/src/c3runtime/instance.ts +++ b/spine-ts/spine-construct3/src/c3runtime/instance.ts @@ -313,7 +313,16 @@ class SpineC3Instance extends globalThis.ISDKWorldInstanceBase { } private updateHandles (skeleton: Skeleton) { - const mouse = this.runtime.mouse; + if (this.dragHandles.size === 0) return; + + // accessing mouse without having a mouse object will throw an error + let mouse: IMouseObjectType; + try { + mouse = this.runtime.mouse; + } catch (_) { + return; + } + const isLeftClickDown = mouse.isMouseButtonDown(0); if (this.dragHandles.size <= 0) { this.prevLeftClickDown = isLeftClickDown;