File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
features/FEATURE_BLE/source/generic Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -1782,7 +1782,8 @@ void GenericGap::on_disconnection_complete(const pal::GapDisconnectionCompleteEv
1782
1782
void GenericGap::on_connection_parameter_request (const pal::GapRemoteConnectionParameterRequestEvent &e)
1783
1783
{
1784
1784
if (_user_manage_connection_parameter_requests) {
1785
- _eventHandler->onUpdateConnectionParametersRequest (
1785
+ if (_eventHandler) {
1786
+ _eventHandler->onUpdateConnectionParametersRequest (
1786
1787
UpdateConnectionParametersRequestEvent (
1787
1788
e.connection_handle ,
1788
1789
conn_interval_t (e.min_connection_interval ),
@@ -1791,6 +1792,7 @@ void GenericGap::on_connection_parameter_request(const pal::GapRemoteConnectionP
1791
1792
supervision_timeout_t (e.supervision_timeout )
1792
1793
)
1793
1794
);
1795
+ }
1794
1796
} else {
1795
1797
_pal_gap.accept_connection_parameter_request (
1796
1798
e.connection_handle ,
@@ -1806,6 +1808,10 @@ void GenericGap::on_connection_parameter_request(const pal::GapRemoteConnectionP
1806
1808
1807
1809
void GenericGap::on_connection_update (const pal::GapConnectionUpdateEvent &e)
1808
1810
{
1811
+ if (!_eventHandler) {
1812
+ return ;
1813
+ }
1814
+
1809
1815
_eventHandler->onConnectionParametersUpdateComplete (
1810
1816
ConnectionParametersUpdateCompleteEvent (
1811
1817
e.status == pal::hci_error_code_t ::SUCCESS ? BLE_ERROR_NONE : BLE_ERROR_UNSPECIFIED,
You can’t perform that action at this time.
0 commit comments