We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f4158f4 commit 55686d1Copy full SHA for 55686d1
source/microbit/microbitmusic.cpp
@@ -74,6 +74,11 @@ extern uint32_t ticks;
74
STATIC uint32_t start_note(const char *note_str, size_t note_len, const microbit_pin_obj_t *pin);
75
76
void microbit_music_tick(void) {
77
+ if (music_data == NULL) {
78
+ // music module not yet imported
79
+ return;
80
+ }
81
+
82
if (music_data->async_state == ASYNC_MUSIC_STATE_IDLE) {
83
// nothing to do
84
return;
0 commit comments