From b7fa19f0f04856d839970876780b03b7fec66591 Mon Sep 17 00:00:00 2001
From: jvallve <jvallve@iri.upc.edu>
Date: Fri, 5 Aug 2022 13:03:20 +0200
Subject: [PATCH] hotfix: bug fixed

---
 include/core/frame/frame_base.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/core/frame/frame_base.h b/include/core/frame/frame_base.h
index fe2b7164d..cb1f99ce9 100644
--- a/include/core/frame/frame_base.h
+++ b/include/core/frame/frame_base.h
@@ -296,7 +296,7 @@ inline std::shared_ptr<const C> FrameBase::getCaptureOfType() const
     {
         auto cap_derived = std::dynamic_pointer_cast<C>(capture_ptr);
         if (cap_derived)
-            return capture_ptr;
+            return cap_derived;
     }
     return nullptr;
 }
@@ -308,7 +308,7 @@ inline std::shared_ptr<C> FrameBase::getCaptureOfType()
     {
         auto cap_derived = std::dynamic_pointer_cast<C>(capture_ptr);
         if (cap_derived)
-            return capture_ptr;
+            return cap_derived;
     }
     return nullptr;
 }
@@ -321,7 +321,7 @@ inline std::list<std::shared_ptr<const C>> FrameBase::getCapturesOfType() const
     {
         auto cap_derived = std::dynamic_pointer_cast<C>(capture_ptr);
         if (cap_derived)
-            captures.push_back(capture_ptr);
+            captures.push_back(cap_derived);
     }
     return captures;
 }
@@ -334,7 +334,7 @@ inline std::list<std::shared_ptr<C>> FrameBase::getCapturesOfType()
     {
         auto cap_derived = std::dynamic_pointer_cast<C>(capture_ptr);
         if (cap_derived)
-            captures.push_back(capture_ptr);
+            captures.push_back(cap_derived);
     }
     return captures;
 }
-- 
GitLab