|
@@ -1720,7 +1720,7 @@ export abstract class MusicSheetCalculator {
|
|
protected maxInstrNameLabelLength(): number {
|
|
protected maxInstrNameLabelLength(): number {
|
|
let maxLabelLength: number = 0.0;
|
|
let maxLabelLength: number = 0.0;
|
|
for (const instrument of this.graphicalMusicSheet.ParentMusicSheet.Instruments) {
|
|
for (const instrument of this.graphicalMusicSheet.ParentMusicSheet.Instruments) {
|
|
- if (instrument.NameLabel.print && instrument.Voices.length > 0 && instrument.Voices[0].Visible) {
|
|
|
|
|
|
+ if (instrument.NameLabel?.print && instrument.Voices.length > 0 && instrument.Voices[0].Visible) {
|
|
let renderedLabel: Label = instrument.NameLabel;
|
|
let renderedLabel: Label = instrument.NameLabel;
|
|
if (!this.rules.RenderPartNames) {
|
|
if (!this.rules.RenderPartNames) {
|
|
renderedLabel = new Label("", renderedLabel.textAlignment, renderedLabel.font);
|
|
renderedLabel = new Label("", renderedLabel.textAlignment, renderedLabel.font);
|