Skip to content

Commit 56913e1

Browse files
committed
Check if driver is set before sending
1 parent 32f93d8 commit 56913e1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/MainClasses/ANTPLUS_AntPlusRouter.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,9 @@ void AntPlusRouter::setProfile(uint8_t channel, BaseProfile* profile) {
6969
}
7070

7171
void AntPlusRouter::send(AntRequest& msg) {
72-
_ant->send(msg);
72+
if (_ant) {
73+
_ant->send(msg);
74+
}
7375
}
7476

7577
uint8_t AntPlusRouter::getMaxChannels() {

0 commit comments

Comments
 (0)