fix null dereference

This commit is contained in:
Tom Ball 2017-06-11 15:49:16 -07:00
parent 1875cc306f
commit 07380d7c07

View File

@ -342,8 +342,8 @@ namespace music {
control.raiseEvent(MICROBIT_MELODY_ID, MusicEvent.BackgroundMelodyResumed);
}
}
currentMelody = null;
control.raiseEvent(MICROBIT_MELODY_ID, currentMelody.background ? MusicEvent.BackgroundMelodyEnded : MusicEvent.MelodyEnded);
currentMelody = null;
})
}
}