diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2017-03-19 02:47:26 +0100 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2017-03-19 02:47:26 +0100 |
commit | d99b87ba4332fd0c1e51d2708e46c52bad713558 (patch) | |
tree | 3a6fdd11929f626eeb1eeade277cec7b8379fb1b /src/diagnostic/diagnostic-manager.cpp | |
parent | f6dcb18fa4d6637b0e9a2ff7eb39f2fe98e815d6 (diff) |
Fix bad handling unsupported OBD2 messages subscription.
Testing supported boolean wrong and gave a null pointer to a function that
doesn't check the pointer validity.
Change-Id: I49e88a68f266546dbd257b0fdade860cead1322d
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'src/diagnostic/diagnostic-manager.cpp')
-rw-r--r-- | src/diagnostic/diagnostic-manager.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/diagnostic/diagnostic-manager.cpp b/src/diagnostic/diagnostic-manager.cpp index 2d4669e..69e2a7c 100644 --- a/src/diagnostic/diagnostic-manager.cpp +++ b/src/diagnostic/diagnostic-manager.cpp @@ -161,7 +161,7 @@ void diagnostic_manager_t::cancel_request(active_diagnostic_request_t* entry) /// @param[in] force - Force the cleaning or not ? void diagnostic_manager_t::cleanup_request(active_diagnostic_request_t* entry, bool force) { - if(force || (entry->get_in_flight() && entry->request_completed())) + if((force || (entry->get_in_flight() && entry->request_completed())) && entry != nullptr) { entry->set_in_flight(false); |