Fix log reading crash under VLOG(2)
We were dereferencing the event loop which doesn't always exist. This
was crashing at the beginning before the event loop was created.
Change-Id: Ifca39169e9d9af9f34c482550995a8797e1bdca3
Signed-off-by: Austin Schuh <austin.linux@gmail.com>
diff --git a/aos/events/logging/log_reader.cc b/aos/events/logging/log_reader.cc
index d8f8b04..8be6747 100644
--- a/aos/events/logging/log_reader.cc
+++ b/aos/events/logging/log_reader.cc
@@ -1675,7 +1675,7 @@
if (result_ptr == nullptr) {
return BootTimestamp::max_time();
}
- VLOG(2) << MaybeNodeName(event_loop_->node()) << "oldest message at "
+ VLOG(2) << MaybeNodeName(node()) << "oldest message at "
<< result_ptr->monotonic_event_time.time;
return result_ptr->monotonic_event_time;
}