Skip to content
Snippets Groups Projects
Commit ef74c956 authored by Matteo Pignataro's avatar Matteo Pignataro
Browse files

[ModuleManager] Replaced static_cast with a dynamic_cast for proper downcasting

parent 47463bc7
No related branches found
No related tags found
No related merge requests found
...@@ -153,7 +153,7 @@ public: ...@@ -153,7 +153,7 @@ public:
// object. It can be done because at every type, a unique id is assigned // object. It can be done because at every type, a unique id is assigned
if (modules[id] != nullptr) if (modules[id] != nullptr)
{ {
return static_cast<T *>(modules[id]); return dynamic_cast<T *>(modules[id]);
} }
// Fail if the module hasn't been added before // Fail if the module hasn't been added before
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment