You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2018/05/02 10:05:27 UTC

[GitHub] michal-narajowski closed pull request #76: nimble/host: Add check before calling a IAS event callback

michal-narajowski closed pull request #76: nimble/host: Add check before calling a IAS event callback
URL: https://github.com/apache/mynewt-nimble/pull/76
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/nimble/host/services/ias/src/ble_svc_ias.c b/nimble/host/services/ias/src/ble_svc_ias.c
index 925befb4..2c7fa657 100644
--- a/nimble/host/services/ias/src/ble_svc_ias.c
+++ b/nimble/host/services/ias/src/ble_svc_ias.c
@@ -103,8 +103,10 @@ ble_svc_ias_access(uint16_t conn_handle, uint16_t attr_handle,
                                    sizeof ble_svc_ias_alert_level,
                                    sizeof ble_svc_ias_alert_level,
                                    &ble_svc_ias_alert_level, NULL);
-        /* Call the IAS event function */
-        ble_svc_ias_cb_fn(ble_svc_ias_alert_level);
+	/* Call the IAS event function */
+	if (ble_svc_ias_cb_fn) {
+		ble_svc_ias_cb_fn(ble_svc_ias_alert_level);
+	}
         return rc;
 
     default:


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services