From 2cf8e8511263ab2546278bceecdcee9e1c938d04 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Joan=20Sol=C3=A0?= <jsola@iri.upc.edu>
Date: Wed, 14 Aug 2019 14:14:59 +0200
Subject: [PATCH] Reverse assert and DEBUG msg for safety

---
 src/processor/processor_base.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/processor/processor_base.cpp b/src/processor/processor_base.cpp
index d3d025b7b..1e8b098df 100644
--- a/src/processor/processor_base.cpp
+++ b/src/processor/processor_base.cpp
@@ -33,8 +33,8 @@ bool ProcessorBase::permittedAuxFrame()
 
 void ProcessorBase::keyFrameCallback(FrameBasePtr _keyframe_ptr, const Scalar& _time_tol_other)
 {
-    WOLF_DEBUG("P", isMotion() ? "M " : "T ", getName(), ": KF", _keyframe_ptr->id(), " callback received with ts = ", _keyframe_ptr->getTimeStamp());
     assert(_keyframe_ptr != nullptr && "keyFrameCallback with a nullptr frame");
+    WOLF_DEBUG("P", isMotion() ? "M " : "T ", getName(), ": KF", _keyframe_ptr->id(), " callback received with ts = ", _keyframe_ptr->getTimeStamp());
 
     // buffering anyway
     buffer_pack_kf_.add(_keyframe_ptr, _time_tol_other);
@@ -47,8 +47,8 @@ void ProcessorBase::keyFrameCallback(FrameBasePtr _keyframe_ptr, const Scalar& _
 
 void ProcessorBase::captureCallback(CaptureBasePtr _capture_ptr)
 {
-    WOLF_DEBUG("P", isMotion() ? "M " : "T ", getName(), ": Capture ", _capture_ptr->id(), " callback received with ts = ", _capture_ptr->getTimeStamp());
     assert(_capture_ptr != nullptr && "captureCallback with a nullptr capture");
+    WOLF_DEBUG("P", isMotion() ? "M " : "T ", getName(), ": Capture ", _capture_ptr->id(), " callback received with ts = ", _capture_ptr->getTimeStamp());
 
     // if trigger, process directly without buffering
     if (triggerInCapture(_capture_ptr))
-- 
GitLab