Skip to content

Commit

Permalink
[P113] Add a few extra nullptr checks
Browse files Browse the repository at this point in the history
  • Loading branch information
tonhuisman committed Aug 13, 2023
1 parent 4a9068e commit 398e412
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/src/PluginStructs/P113_data_struct.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ bool P113_data_struct::begin() {
}

bool P113_data_struct::startRead() {
if (initState && !readActive) {
if (initState && !readActive && (nullptr != sensor)) {
sensor->startRanging();
readActive = true;
distance = -1;
Expand Down

0 comments on commit 398e412

Please sign in to comment.