@@ -905,7 +905,7 @@ export class OpenSheetMusicDisplay {
// create new cursor
if (backendToDrawOn && backendToDrawOn.getRenderElement()) {
if (this.cursors[i]) {
- this.PlaybackManager.removeListener(this.cursors[i]);
+ this.PlaybackManager?.removeListener(this.cursors[i]);
this.cursors[i].Dispose();
}
this.cursors[i] = new Cursor(backendToDrawOn.getRenderElement(), this, this.cursorsOptions[i]);