Skip to content

Commit

Permalink
Removed nullptr access from Timer().hasStarted() (ros#1541)
Browse files Browse the repository at this point in the history
  • Loading branch information
kunaltyagi authored and dirk-thomas committed Jan 2, 2019
1 parent 64fe1c8 commit fe9479c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clients/roscpp/include/ros/timer.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class ROSCPP_DECL Timer
*/
void setPeriod(const Duration& period, bool reset=true);

bool hasStarted() const { return impl_->hasStarted(); }
bool hasStarted() const { return impl_ && impl_->hasStarted(); }
bool isValid() { return impl_ && impl_->isValid(); }
operator void*() { return isValid() ? (void*)1 : (void*)0; }

Expand Down

0 comments on commit fe9479c

Please sign in to comment.