Showing
1 changed file
with
3 additions
and
1 deletions
@@ -390,7 +390,9 @@ final class MqttClientImpl implements MqttClient { | @@ -390,7 +390,9 @@ final class MqttClientImpl implements MqttClient { | ||
390 | } | 390 | } |
391 | 391 | ||
392 | public void onSuccessfulReconnect() { | 392 | public void onSuccessfulReconnect() { |
393 | - callback.onSuccessfulReconnect(); | 393 | + if (callback != null) { |
394 | + callback.onSuccessfulReconnect(); | ||
395 | + } | ||
394 | } | 396 | } |
395 | 397 | ||
396 | 398 |