diff --git a/Adafruit_MQTT.cpp b/Adafruit_MQTT.cpp index 1da9be2..85f91d8 100644 --- a/Adafruit_MQTT.cpp +++ b/Adafruit_MQTT.cpp @@ -239,6 +239,9 @@ void Adafruit_MQTT::processSubscriptionPacket(Adafruit_MQTT_Subscribe *sub) { } else if (sub->callback_io != NULL) { // execute callback in io mode ((sub->io_mqtt)->*(sub->callback_io))((char *)sub->lastread, sub->datalen); + } else { + DEBUG_PRINTLN("ERROR: Subscription packet did not have an associated callback"); + return; } // mark subscription message as "read"" sub->new_message = false; diff --git a/library.properties b/library.properties index 5231595..f2aca1f 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=Adafruit MQTT Library -version=2.4.4 +version=2.5.0 author=Adafruit maintainer=Adafruit sentence=MQTT library that supports the FONA, ESP8266, ESP32, Yun, and generic Arduino Client hardware.