diff --git a/src/solver/solver_manager.cpp b/src/solver/solver_manager.cpp
index b26b977a519983f5d0e06b6cd177682dd78272a4..5dcde9d698b4518e0276b3266016bd8354db97cf 100644
--- a/src/solver/solver_manager.cpp
+++ b/src/solver/solver_manager.cpp
@@ -55,9 +55,7 @@ void SolverManager::update()
       }
       case StateBlock::Notification::STATE_UPDATE:
       {
-        const bool registered = state_blocks_.find(state)!=state_blocks_.end();
-
-        WOLF_DEBUG_COND(!registered,
+        WOLF_DEBUG_COND(state_blocks_.find(state)==state_blocks_.end(),
                         "Updating the state of an unregistered StateBlock !");
 
         // This will throw if StateBlock wasn't registered